Changeset View
Changeset View
Standalone View
Standalone View
contrib/xz/src/common/mythread.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | if (!once_) { \ | ||||
func(); \ | func(); \ | ||||
once_ = true; \ | once_ = true; \ | ||||
} \ | } \ | ||||
} while (0) | } while (0) | ||||
#if !(defined(_WIN32) && !defined(__CYGWIN__)) | #if !(defined(_WIN32) && !defined(__CYGWIN__)) | ||||
// Use sigprocmask() to set the signal mask in single-threaded programs. | // Use sigprocmask() to set the signal mask in single-threaded programs. | ||||
#ifndef _KERNEL | |||||
#include <signal.h> | #include <signal.h> | ||||
#endif | |||||
static inline void | static inline void | ||||
mythread_sigmask(int how, const sigset_t *restrict set, | mythread_sigmask(int how, const sigset_t *restrict set, | ||||
sigset_t *restrict oset) | sigset_t *restrict oset) | ||||
{ | { | ||||
#ifndef _KERNEL | |||||
int ret = sigprocmask(how, set, oset); | int ret = sigprocmask(how, set, oset); | ||||
assert(ret == 0); | assert(ret == 0); | ||||
(void)ret; | (void)ret; | ||||
#endif | |||||
} | } | ||||
#endif | #endif | ||||
#elif defined(MYTHREAD_POSIX) | #elif defined(MYTHREAD_POSIX) | ||||
//////////////////// | //////////////////// | ||||
// Using pthreads // | // Using pthreads // | ||||
▲ Show 20 Lines • Show All 421 Lines • Show Last 20 Lines |