Added and implemented pthread_atfork().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9307 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-12 16:36:12 +00:00
parent c0126bf6e4
commit 10031c3053
2 changed files with 22 additions and 4 deletions

View File

@ -1,9 +1,11 @@
SubDir OBOS_TOP src kernel libroot posix pthread ;
UsePrivateHeaders libroot ;
KernelMergeObject posix_pthread.o :
<$(SOURCE_GRIST)>pthread_mutex.c
<$(SOURCE_GRIST)>pthread_mutexattr.c
:
-fPIC -DPIC
pthread_atfork.c
pthread_mutex.c
pthread_mutexattr.c
: -fPIC -DPIC
;

View File

@ -0,0 +1,16 @@
/*
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
#include <pthread.h>
#include <fork.h>
int
pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
{
return __register_atfork(prepare, parent, child);
}