diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-10-30 03:37:35 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-10-30 03:37:35 +0000 |
commit | 62b1ec6e3667b903b262c213211453eadd3f1f93 (patch) | |
tree | ab5296a9073f4c6c817bd4ab531b69b2d76522c2 /lib/libpthread/uthread/pthread_private.h | |
parent | dec824965a7de11d9973b93c5288156da4541f74 (diff) |
Add pthread_atfork(3)
From FreeBSD
'looks ok' fgsch@ miod@
man page reviewed by jmc@
Diffstat (limited to 'lib/libpthread/uthread/pthread_private.h')
-rw-r--r-- | lib/libpthread/uthread/pthread_private.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h index aef55382c95..bfb038aa671 100644 --- a/lib/libpthread/uthread/pthread_private.h +++ b/lib/libpthread/uthread/pthread_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread_private.h,v 1.53 2004/06/07 21:11:23 marc Exp $ */ +/* $OpenBSD: pthread_private.h,v 1.54 2005/10/30 03:37:34 brad Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -345,6 +345,13 @@ struct pthread_cleanup { void *routine_arg; }; +struct pthread_atfork { + TAILQ_ENTRY(pthread_atfork) qe; + void (*prepare)(void); + void (*parent)(void); + void (*child)(void); +}; + struct pthread_attr { int sched_policy; int sched_inherit; @@ -901,6 +908,9 @@ SCLASS struct pthread *_thread_initial ; #endif +SCLASS TAILQ_HEAD(atfork_head, pthread_atfork) _atfork_list; +SCLASS pthread_mutex_t _atfork_mutex; + /* Default thread attributes: */ SCLASS struct pthread_attr pthread_attr_default #ifdef GLOBAL_PTHREAD_PRIVATE |