1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/lib/libkse/thread
Brian Somers 225721f00b Modify the code path of the ifdef NOTYET part of _kse_single_thread():
o  Don't reinitialise the atfork() handler list in the child.  We
   are meant to call the child handler, and on subsequent fork()s
   should call all three functions as normal.
o  Don't reinitialise the thread specific keyed data in the
   child after a fork.  Applications may require this for context.
o  Reinitialise curthread->tlflags after removing ourselves from
   (and reinitialising) the various internal thread lists.
o  Reinitialise __malloc_lock in the child after fork() (to balance
   our explicitly taking the lock prior to the fork()).

With these changes, it is possible to enable the NOTYET code in
thr_kern.c to allow the use of non-async-safe functions after
fork()ing from a threaded program.

Reviewed by:	Daniel Eischen <deischen@freebsd.org>
[_malloc_lock reinitialisation has since been moved to avoid polluting the
!NOTYET code]
2005-09-24 01:19:53 +00:00
..
Makefile.inc Add a wrapper for execve(). The exec'd process must be started with 2004-09-26 06:50:15 +00:00
thr_accept.c
thr_aio_suspend.c
thr_atfork.c
thr_attr_destroy.c
thr_attr_get_np.c
thr_attr_getdetachstate.c
thr_attr_getguardsize.c
thr_attr_getinheritsched.c
thr_attr_getschedparam.c
thr_attr_getschedpolicy.c
thr_attr_getscope.c
thr_attr_getstack.c
thr_attr_getstackaddr.c
thr_attr_getstacksize.c
thr_attr_init.c Increase the default stacksizes: 2005-02-13 18:38:06 +00:00
thr_attr_setcreatesuspend_np.c
thr_attr_setdetachstate.c
thr_attr_setguardsize.c
thr_attr_setinheritsched.c
thr_attr_setschedparam.c
thr_attr_setschedpolicy.c
thr_attr_setscope.c
thr_attr_setstack.c
thr_attr_setstackaddr.c
thr_attr_setstacksize.c
thr_autoinit.c
thr_barrier.c
thr_barrierattr.c
thr_cancel.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_clean.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_close.c
thr_concurrency.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_cond.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_condattr_destroy.c
thr_condattr_init.c
thr_connect.c
thr_creat.c
thr_create.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_detach.c
thr_equal.c
thr_execve.c Use PTHREAD_SCOPE_SYSTEM to decide what should be done. 2004-10-07 14:23:15 +00:00
thr_exit.c Check unhandled signals before thread marks itself as DEAD, 2004-10-23 23:37:54 +00:00
thr_fcntl.c
thr_find_thread.c 1. Move thread list flags into new separate member, and atomically 2004-10-23 23:28:36 +00:00
thr_fork.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_fsync.c
thr_getprio.c
thr_getschedparam.c
thr_info.c
thr_init.c Modify the code path of the ifdef NOTYET part of _kse_single_thread(): 2005-09-24 01:19:53 +00:00
thr_join.c
thr_kern.c Modify the code path of the ifdef NOTYET part of _kse_single_thread(): 2005-09-24 01:19:53 +00:00
thr_kill.c
thr_main_np.c
thr_mattr_init.c
thr_mattr_kind_np.c - Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution. 2005-08-19 21:31:42 +00:00
thr_msync.c
thr_multi_np.c
thr_mutex_prioceiling.c
thr_mutex_protocol.c
thr_mutex.c - Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution. 2005-08-19 21:31:42 +00:00
thr_mutexattr_destroy.c
thr_nanosleep.c
thr_once.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_open.c
thr_pause.c
thr_poll.c
thr_printf.c
thr_priority_queue.c s/TMDF_DONOTRUNUSER/TMDF_SUSPEND/g 2004-08-03 02:23:06 +00:00
thr_private.h Fix off-by-one nanosecond in macro TIMESPEC_ADD. 2005-06-22 22:35:49 +00:00
thr_pselect.c
thr_pspinlock.c Include needed headers that were obtained through <pthread.h>. Sort headers 2005-09-01 15:21:23 +00:00
thr_raise.c
thr_read.c
thr_readv.c
thr_resume_np.c
thr_rtld.c Don't attempt to initialize the rtld lock if it can't be malloc()'d. 2005-08-29 13:47:42 +00:00
thr_rwlock.c
thr_rwlockattr.c
thr_select.c
thr_self.c
thr_sem.c Include needed headers that were obtained through <pthread.h>. Sort headers 2005-09-01 15:21:23 +00:00
thr_seterrno.c
thr_setprio.c
thr_setschedparam.c
thr_sig.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_sigaction.c
thr_sigaltstack.c
thr_sigmask.c
thr_sigpending.c
thr_sigprocmask.c
thr_sigsuspend.c Include needed headers that were obtained through <pthread.h>. Sort headers 2005-09-01 15:21:23 +00:00
thr_sigwait.c
thr_single_np.c
thr_sleep.c Add a cancellation point for usleep(). 2005-08-03 00:48:13 +00:00
thr_spec.c
thr_spinlock.c Use a generic way to back threads out of wait queues when handling 2004-12-18 18:07:37 +00:00
thr_stack.c Increase the default stacksizes: 2005-02-13 18:38:06 +00:00
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c Include needed headers that were obtained through <pthread.h>. Sort headers 2005-09-01 15:21:23 +00:00
thr_system.c
thr_tcdrain.c
thr_vfork.c
thr_wait4.c
thr_wait.c
thr_waitpid.c
thr_write.c
thr_writev.c
thr_yield.c