Pthread conds and broadcasts use SLISTS
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 12 May 2015 14:35:14 +0000 (10:35 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 15 May 2015 01:35:44 +0000 (21:35 -0400)
commite9a8e1d7cd68cf10f45e88b034bfcf4a5a26ea9f
tree8fd144e2eadd8141d9b3492318be5fa038293f33
parent678bb0653c96edb60acd6cac54967d8f33d90535
Pthread conds and broadcasts use SLISTS

This fixes PTHREAD_COND_INITIALIZER.  The issue was that we can't use
TAILQs, because then the static initializer would need a parameter.

Now, there's an SLIST and a TAILQ.  The 2LS lists are TAILQs.  The
cond/barrier/mutex (eventually) are SLISTs.  A thread should only be on
one at a time.

This commit also cleans up things a bit, since broadcast and barrier had
similar, repeated code.
tests/pthread_test.c
user/pthread/pthread.c
user/pthread/pthread.h