/[base]
ViewVC logotype

Revision 184172


Jump to revision: Previous Next
Author: alfred
Date: Wed Oct 22 18:07:37 2008 UTC (15 years, 8 months ago)
Changed paths: 3
Log Message:
Close races in the pthread_condvar implementation in 6.x, note that
7.x and beyond have very different implementations and these fixes
do not apply.

In the kernel:

  Move the flag UQF_UMTXQ from the thread's td_flags where it was
  unlocked to the umtx_q struct where it now has locking.

  Nuke the UMTX_DYNAMIC_SHARED define while here, it's unused and
  complex.

  Refactor do_wait so that if we get a signal or timeout AND woken
  up, we forward the wakeup to any other waiters pending to avoid
  a missed wakeup.

In userland:

  Bring over some fixes from DragonFlyBSD for the userland part of
  pthread_condvars, basically relax the consistency on the number of
  waiters and signals pending because it was both too strict and
  incorrect causing lost wakeups.

Reviewed by: davidxu
Approved by: re


Changed paths

Path Details
Directorystable/6/lib/libthr/thread/thr_cond.c modified , text changed
Directorystable/6/lib/libthr/thread/thr_private.h modified , text changed
Directorystable/6/sys/kern/kern_umtx.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27