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_ */