summaryrefslogtreecommitdiff
path: root/include/pthread.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-18 19:52:42 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-18 19:52:42 -0500
commite9417fffb39c299e556c5ad0c1545f0c02618e3c (patch)
tree90c04bef0567ff4df7c7b57986a756b8b11b506c /include/pthread.h
parent446b4207cc7a30d8a4d5b2445a5a1b27d440f55d (diff)
downloadmusl-e9417fffb39c299e556c5ad0c1545f0c02618e3c.tar.gz
musl-e9417fffb39c299e556c5ad0c1545f0c02618e3c.tar.bz2
musl-e9417fffb39c299e556c5ad0c1545f0c02618e3c.tar.xz
musl-e9417fffb39c299e556c5ad0c1545f0c02618e3c.zip
add pthread_atfork interface
note that this presently does not handle consistency of the libc's own global state during forking. as per POSIX 2008, if the parent process was threaded, the child process may only call async-signal-safe functions until one of the exec-family functions is called, so the current behavior is believed to be conformant even if non-ideal. it may be improved at some later time.
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/pthread.h b/include/pthread.h
index 749a0e8c..19199468 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -162,6 +162,8 @@ int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *);
int pthread_barrierattr_init(pthread_barrierattr_t *);
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
+int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
+
#include <bits/pthread.h>
int __setjmp(void *);