1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Wrappers for threads
6 // Author: Lasse Collin
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
19 # define mythread_once(func) \
21 static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
22 pthread_once(&once_, &func); \
25 # define mythread_sigmask(how, set, oset) \
26 pthread_sigmask(how, set, oset)
30 # define mythread_once(func) \
32 static bool once_ = false; \
39 # define mythread_sigmask(how, set, oset) \
40 sigprocmask(how, set, oset)