[freenos] r409 committed - Implemented the POSIX getpid() function.

  • From: freenos@xxxxxxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Tue, 19 Oct 2010 21:44:48 +0000

Revision: 409
Author: nieklinnenbank
Date: Tue Oct 19 14:40:39 2010
Log: Implemented the POSIX getpid() function.

http://code.google.com/p/freenos/source/detail?r=409

Modified:
 /branches/scratch/lib/libposix/unistd/getpid.c

=======================================
--- /branches/scratch/lib/libposix/unistd/getpid.c      Sun Oct 10 16:06:55 2010
+++ /branches/scratch/lib/libposix/unistd/getpid.c      Tue Oct 19 14:40:39 2010
@@ -15,12 +15,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */

-#include <errno.h>
+#include <FreeNOS/api.h>
 #include "unistd.h"

 pid_t getpid()
 {
-    errno = ENOSYS;
-    return (pid_t) -1;
+    return (pid_t) api_proc_id();
 }


Other related posts:

  • » [freenos] r409 committed - Implemented the POSIX getpid() function. - freenos