The NetBSD Project

CVS log for src/lib/libpthread/pthread_barrier.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libpthread

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: matt-mips64-base2


Revision 1.18 / (download) - annotate - [select for diffs], Sun May 25 17:05:28 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, christos-time_t-nbase, christos-time_t-base
Branch point for: netbsd-5, christos-time_t
Changes since 1.17: +26 -27 lines
Diff to previous 1.17 (colored)

PR lib/38741 priority inversion in libpthread breaks apps that use
SCHED_FIFO threads

- Change condvar sync so that we never take the condvar's spinlock without
  first holding the caller-provided mutex. Previously, the spinlock was only
  taken without the mutex in an error path, but it was enough to trigger the
  problem described in the PR.

- Even with this change, applications calling pthread_cond_signal/broadcast
  without holding the interlocking mutex are still subject to the problem
  described in the PR. POSIX discourages this saying that it leads to
  undefined scheduling behaviour, which seems good enough for the time being.

- Elsewhere, use a hash of mutexes instead of per-object spinlocks to
  synchronize entry/exit from sleep queues.

- Simplify how sleep queues are maintained.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>