From 10031c30530c53c7b87b88be879d8ade81efbc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 12 Oct 2004 16:36:12 +0000 Subject: [PATCH] Added and implemented pthread_atfork(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9307 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/pthread/Jamfile | 10 ++++++---- .../libroot/posix/pthread/pthread_atfork.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 src/kernel/libroot/posix/pthread/pthread_atfork.c diff --git a/src/kernel/libroot/posix/pthread/Jamfile b/src/kernel/libroot/posix/pthread/Jamfile index 85ab33ced7..c211bae450 100644 --- a/src/kernel/libroot/posix/pthread/Jamfile +++ b/src/kernel/libroot/posix/pthread/Jamfile @@ -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 ; diff --git a/src/kernel/libroot/posix/pthread/pthread_atfork.c b/src/kernel/libroot/posix/pthread/pthread_atfork.c new file mode 100644 index 0000000000..c2662d1ac5 --- /dev/null +++ b/src/kernel/libroot/posix/pthread/pthread_atfork.c @@ -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 +#include + + +int +pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) +{ + return __register_atfork(prepare, parent, child); +} +