Added process.c to the build, implemented getpid().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5377 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,6 +17,7 @@ KernelMergeObject posix_unistd.o :
|
|||||||
<$(SOURCE_GRIST)>mount.c
|
<$(SOURCE_GRIST)>mount.c
|
||||||
<$(SOURCE_GRIST)>open.c
|
<$(SOURCE_GRIST)>open.c
|
||||||
<$(SOURCE_GRIST)>pipe.c
|
<$(SOURCE_GRIST)>pipe.c
|
||||||
|
<$(SOURCE_GRIST)>process.c
|
||||||
<$(SOURCE_GRIST)>read.c
|
<$(SOURCE_GRIST)>read.c
|
||||||
<$(SOURCE_GRIST)>sleep.c
|
<$(SOURCE_GRIST)>sleep.c
|
||||||
<$(SOURCE_GRIST)>terminal.c
|
<$(SOURCE_GRIST)>terminal.c
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
||||||
|
extern thread_id __main_thread_id;
|
||||||
|
|
||||||
|
|
||||||
// ToDo: implement the process ID functions for real!
|
// ToDo: implement the process ID functions for real!
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +26,8 @@ getpgrp(void)
|
|||||||
pid_t
|
pid_t
|
||||||
getpid(void)
|
getpid(void)
|
||||||
{
|
{
|
||||||
return 0;
|
// this one returns the ID of the main thread
|
||||||
|
return __main_thread_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user