posixcompat: make pthread_once a wrapper over the version in libbarrelfish
authorZaheer Chothia <zchothia@inf.ethz.ch>
Wed, 17 Dec 2014 14:08:15 +0000 (15:08 +0100)
committerZaheer Chothia <zchothia@inf.ethz.ch>
Mon, 20 Apr 2015 21:09:32 +0000 (23:09 +0200)
commitaee0075101b1e23c21eb6f2c3ba2235878fabae8
tree1d2ceaf7782be3b612951a105f7625e7a39fe0cd
parentf8cc9635d0d8c6c802b0c37d11007b3f4e960ee6
posixcompat: make pthread_once a wrapper over the version in libbarrelfish

Summary:
Both the pthread and native versions now share a single common
implementation (added in D9).  The new approach should also be faster
since it avoids a full mutex and instead only has to consult the
per-thread epoch on the common path.  I should note, I have not run
any benchmarks to confirm this and may be wrong.

Test Plan: Compiles but have not validated more thoroughly.

Differential Revision: https://code.systems.ethz.ch/D12

Signed-off-by: Zaheer Chothia <zchothia@inf.ethz.ch>
include/barrelfish/thread_sync.h
include/barrelfish/threads.h
include/pthread.h
include/sys/_pthreadtypes.h
lib/barrelfish/thread_once.c
lib/posixcompat/pthreads.c