freebsd-dev/lib/libthr/thread
Konstantin Belousov 066d836b02 Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month
2009-10-27 10:55:34 +00:00
..
Makefile.inc
thr_affinity.c
thr_atfork.c
thr_attr.c
thr_autoinit.c
thr_barrier.c
thr_barrierattr.c
thr_cancel.c
thr_clean.c
thr_concurrency.c
thr_cond.c
thr_condattr.c
thr_create.c
thr_detach.c
thr_equal.c
thr_event.c Allow psaddr_t to be widened by using thr_pread_{int,long,ptr}, 2008-09-14 16:07:21 +00:00
thr_exit.c Move call to _malloc_thread_cleanup() so that if this is the last thread, 2008-09-09 17:14:32 +00:00
thr_fork.c These are some cosmetic changes to improve the clarity of libthr's fork implementation. 2009-05-11 16:45:53 +00:00
thr_getcpuclockid.c
thr_getprio.c
thr_getschedparam.c
thr_info.c
thr_init.c
thr_join.c
thr_kern.c
thr_kill.c
thr_list.c
thr_main_np.c
thr_multi_np.c
thr_mutex.c
thr_mutexattr.c
thr_once.c
thr_printf.c
thr_private.h Make openat(2) a cancellation point. 2009-10-11 20:19:45 +00:00
thr_pspinlock.c
thr_resume_np.c
thr_rtld.c In the current code, rdlock_count is not correctly handled for some cases. 2009-07-06 09:31:04 +00:00
thr_rwlock.c In the current code, rdlock_count is not correctly handled for some cases. 2009-07-06 09:31:04 +00:00
thr_rwlockattr.c
thr_self.c
thr_sem.c
thr_setprio.c
thr_setschedparam.c
thr_sig.c
thr_single_np.c
thr_spec.c don't report error if key was deleted. 2009-09-25 00:15:30 +00:00
thr_spinlock.c
thr_stack.c
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c
thr_syscalls.c Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
thr_umtx.c
thr_umtx.h rwlock implemented from libthr need to fall through the 'hard path' and 2009-09-23 21:38:57 +00:00
thr_yield.c