futex: Make futexes independent of pthreads
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 7 Apr 2017 17:59:51 +0000 (13:59 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 May 2017 16:13:02 +0000 (12:13 -0400)
commit80719a1b548b9ee8f8db1b629e3d2db4da4040c9
treebaa80ec0f38ff545af59ba4a57dbc1e821f6c043
parent9aec15ac328822e0f8df2d72a038ab61142061fe
futex: Make futexes independent of pthreads

Unlike POSIX semaphores, the futex code can't be implemented 1:1 with
semaphores or CVs.  It manages its own wakeup conditions and whatnot.  We
probably could reimplement the whole thing with other uthread primitives.
For now, we just want to make it not depend on pthread code.

Similar to POSIX semaphores, futex.h is a common header for the Linux/POSIX
world, and is an API people will want to use regardless of their 2LS.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/pthread/futex.c