freebsd-src/lib/libthr/thread
Konstantin Belousov 1c70d00733 Right now, the rtld prefork hook locks the rtld bind lock in the read
mode.  This allows the binder to be functional in the child after the
fork (assuming no lazy loading of a filter is needed), but other rtld
services which require write lock on rtld_bind_lock cause deadlock, if
called by child.

Change the _rtld_atfork() to lock the bind lock in write mode, making
the rtld fully functional after the fork.

Pre-resolve the symbols which are called by the libthr' fork()
interposer, since dynamic resolution causes deadlock due to the
rtld_bind_lock already owned in the write mode.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-05-24 10:23:06 +00:00
..
Makefile.inc
thr_affinity.c
thr_attr.c
thr_autoinit.c
thr_barrier.c When destroying a barrier, waiting all threads exit the barrier, 2012-03-16 04:35:52 +00:00
thr_barrierattr.c
thr_cancel.c The SUSv4tc1 requires that pthread_setcancelstate() shall be not a 2013-06-19 04:47:41 +00:00
thr_clean.c
thr_concurrency.c
thr_cond.c Do defered mutex wakeup once. 2012-08-12 00:56:56 +00:00
thr_condattr.c
thr_create.c
thr_detach.c
thr_equal.c
thr_event.c
thr_exit.c
thr_fork.c Right now, the rtld prefork hook locks the rtld bind lock in the read 2014-05-24 10:23:06 +00:00
thr_getcpuclockid.c Implement syscall clock_getcpuclockid2, so we can get a clock id 2012-08-17 02:26:31 +00:00
thr_getprio.c
thr_getschedparam.c Don't forget to initialize return value. 2012-07-20 05:47:12 +00:00
thr_getthreadid_np.c
thr_info.c Simplify code by replacing _thr_ref_add() with _thr_find_thread(). 2012-07-20 03:37:19 +00:00
thr_init.c libthr: Always use the threaded rtld lock implementation. 2013-01-18 23:08:40 +00:00
thr_join.c
thr_kern.c libthr: Always use the threaded rtld lock implementation. 2013-01-18 23:08:40 +00:00
thr_kill.c In _pthread_kill(), if passed pthread is current thread, do not send 2014-02-01 18:13:18 +00:00
thr_list.c Make code more stable by checking NULL pointers. 2012-02-11 04:12:12 +00:00
thr_main_np.c
thr_multi_np.c
thr_mutex.c MFp4: 2012-08-11 23:17:02 +00:00
thr_mutexattr.c
thr_once.c
thr_printf.c
thr_private.h If check_deferred_signal() execution needs binding of PLT symbol, 2013-11-23 15:48:17 +00:00
thr_pspinlock.c
thr_resume_np.c In suspend_common(), don't wait for a thread which is in creation, because 2012-08-27 03:09:39 +00:00
thr_rtld.c Right now, the rtld prefork hook locks the rtld bind lock in the read 2014-05-24 10:23:06 +00:00
thr_rwlock.c Follow changes made in revision 232144, pass absolute timeout to kernel, 2012-02-27 13:38:52 +00:00
thr_rwlockattr.c
thr_self.c
thr_sem.c
thr_setprio.c Don't assign same value. 2012-07-20 03:22:17 +00:00
thr_setschedparam.c Don't assign same value. 2012-07-20 03:22:17 +00:00
thr_sig.c If check_deferred_signal() execution needs binding of PLT symbol, 2013-11-23 15:48:17 +00:00
thr_single_np.c
thr_sleepq.c Create a common function lookup() to search a chan, this eliminates 2012-05-10 09:30:37 +00:00
thr_spec.c Return one-based key so that user can check if the key is ever allocated 2013-05-16 03:01:04 +00:00
thr_spinlock.c
thr_stack.c
thr_suspend_np.c In suspend_common(), don't wait for a thread which is in creation, because 2012-08-27 03:09:39 +00:00
thr_switch_np.c
thr_symbols.c
thr_syscalls.c Add accept4() system call. 2013-05-01 20:10:21 +00:00
thr_umtx.c Use clockid parameter instead of hard-coded CLOCK_REALTIME. 2012-03-19 00:07:10 +00:00
thr_umtx.h libthr: Fix a parameter name in an internal header file. 2013-04-27 14:21:36 +00:00
thr_yield.c