summaryrefslogtreecommitdiff
path: root/src/lib/libc/include/thread_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/include/thread_private.h')
-rw-r--r--src/lib/libc/include/thread_private.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/libc/include/thread_private.h b/src/lib/libc/include/thread_private.h
index 673fb9c6a6..43ebf7d96e 100644
--- a/src/lib/libc/include/thread_private.h
+++ b/src/lib/libc/include/thread_private.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: thread_private.h,v 1.25 2011/10/16 06:29:56 guenther Exp $ */ 1/* $OpenBSD: thread_private.h,v 1.26 2015/04/07 01:27:07 guenther Exp $ */
2 2
3/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ 3/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */
4 4
@@ -160,6 +160,18 @@ void _thread_atexit_unlock(void);
160 _thread_atexit_unlock();\ 160 _thread_atexit_unlock();\
161 } while (0) 161 } while (0)
162 162
163void _thread_atfork_lock(void);
164void _thread_atfork_unlock(void);
165
166#define _ATFORK_LOCK() do { \
167 if (__isthreaded) \
168 _thread_atfork_lock(); \
169 } while (0)
170#define _ATFORK_UNLOCK() do { \
171 if (__isthreaded) \
172 _thread_atfork_unlock();\
173 } while (0)
174
163void _thread_arc4_lock(void); 175void _thread_arc4_lock(void);
164void _thread_arc4_unlock(void); 176void _thread_arc4_unlock(void);
165 177
@@ -172,4 +184,9 @@ void _thread_arc4_unlock(void);
172 _thread_arc4_unlock();\ 184 _thread_arc4_unlock();\
173 } while (0) 185 } while (0)
174 186
187/*
188 * Wrapper for _thread_sys_fork()
189 */
190pid_t _thread_fork(void);
191
175#endif /* _THREAD_PRIVATE_H_ */ 192#endif /* _THREAD_PRIVATE_H_ */