freebsd-dev/lib/libthr/thread
Attilio Rao b13c5f2883 rwlock implemented from libthr need to fall through the 'hard path' and
query umtx also if the shared waiters bit is set on a shared lock.
The writer starvation avoidance technique, infact, can lead to shared
waiters on a shared lock which can bring to a missed wakeup and thus
to a deadlock if the right bit is not checked (a notable case is the
writers counterpart to be handled through expired timeouts).

Fix that by checking for the shared waiters bit also when unlocking the
shared locks.

That bug was causing a reported MySQL deadlock.
Many thanks go to Nick Esborn and his employer DesertNet which provided
time and machines to identify and fix this issue.

PR:		thread/135673
Reported by:	Nick Esborn <nick at desert dot net>
Tested by:	Nick Esborn <nick at desert dot net>
Reviewed by:	jeff
2009-09-23 21:38:57 +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
thr_exit.c
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
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
thr_spinlock.c
thr_stack.c
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c
thr_syscalls.c Don't ignore other fcntl functions, directly call __sys_fcntl if 2009-03-09 05:54:43 +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