1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Wrappers for threads
6 // Author: Lasse Collin
7 // This file has been put into the public domain.
9 ///////////////////////////////////////////////////////////////////////////////
17 # define mythread_once(func) \
19 static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
20 pthread_once(&once_, &func); \
23 # define mythread_sigmask(how, set, oset) \
24 pthread_sigmask(how, set, oset)
28 # define mythread_once(func) \
30 static bool once_ = false; \
37 # define mythread_sigmask(how, set, oset) \
38 sigprocmask(how, set, oset)