parlib: Add static initializers for mutexes / CVs
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 5 Apr 2017 18:32:34 +0000 (14:32 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
commit479942c7dabc459ed92e05d57c8050039904e4a4
tree447c37409f1d56d0ae08e87156a6384ef0f64829
parentb3dca05ae521d29d53519ca56cd6540741385f91
parlib: Add static initializers for mutexes / CVs

We'll need these for GCC generic thread interface.  Note we don't have a
static destructor, so to speak.  Under the hood, the sync object and its
size is controlled by the 2LS, and there may be some amount of work the 2LS
needs to do to destroy the object.  For now, don't free statically
initialized mutexes/CV.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/parlib/include/parlib/uthread.h
user/parlib/mutex.c
user/utest/cv.c