Pthread barrier work
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 1 Apr 2013 20:48:07 +0000 (13:48 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 1 Apr 2013 20:48:07 +0000 (13:48 -0700)
commit2a41ca90322709f50e28ad9316938419b2f476e4
tree56406a1a103b86ca78c2261309655ba72e99ff2c
parente3c205a04270e0e0d61494d55defeff03b29fb83
Pthread barrier work

Pthreads will block on a barrier now, instead of spinning and yielding
(pthread_yield() would keep them on the runqueue).

Not clear yet what is the best spin/block strategy.  !threads_active is
safe, but not always optimal.
tests/pthread_barrier_test.c
user/parlib/spinlock.c
user/parlib/uthread.c
user/pthread/pthread.c
user/pthread/pthread.h