From 45b820dd775e6a6e6816510eca848b341d75e2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 12 Oct 2004 16:25:07 +0000 Subject: [PATCH] Made header C++ safe, added prototype for pthread_atfork(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9301 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/pthread.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/headers/posix/pthread.h b/headers/posix/pthread.h index fd40968ef5..e34d46c033 100644 --- a/headers/posix/pthread.h +++ b/headers/posix/pthread.h @@ -1,8 +1,8 @@ +/* +** Distributed under the terms of the Haiku License. +*/ #ifndef _PTHREAD_H_ #define _PTHREAD_H_ -/* -** Distributed under the terms of the OpenBeOS License. -*/ #include @@ -29,6 +29,10 @@ typedef struct _pthread_mutexattr *pthread_mutexattr_t; //extern pthread_mutexattr_t pthread_mutexattr_default; +#ifdef __cplusplus +extern "C" { +#endif + extern pthread_mutex_t _pthread_mutex_static_initializer(void); extern pthread_mutex_t _pthread_recursive_mutex_static_initializer(void); #define PTHREAD_MUTEX_INITIALIZER \ @@ -59,4 +63,11 @@ extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *mutexAttr, int pro extern int pthread_mutexattr_setpshared(pthread_mutexattr_t *mutexAttr, int processShared); extern int pthread_mutexattr_settype(pthread_mutexattr_t *mutexAttr, int type); +/* misc. functions */ +extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)); + +#ifdef __cplusplus +} +#endif + #endif /* _PTHREAD_ */