mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
Fixes to support FreeBSD and Darwin.
This commit is contained in:
@@ -30,6 +30,17 @@
|
||||
|
||||
#define SIGWAKEUP SIGUSR1
|
||||
|
||||
#if !HAVE_PTHREAD_SIGNAL
|
||||
// boy, is this platform broken. forget about pthread signal
|
||||
// handling and let signals through to every process. synergy
|
||||
// will not terminate cleanly when it gets SIGTERM or SIGINT.
|
||||
# define pthread_sigmask sigprocmask
|
||||
# define pthread_kill(tid_, sig_) kill(0, (sig_))
|
||||
# define sigwait(set_, sig_)
|
||||
# undef HAVE_POSIX_SIGWAIT
|
||||
# define HAVE_POSIX_SIGWAIT 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// CArchThreadImpl
|
||||
//
|
||||
@@ -318,7 +329,9 @@ CArchMultithreadPosix::newThread(ThreadFunc func, void* data)
|
||||
// can't tell the difference.
|
||||
if (!m_newThreadCalled) {
|
||||
m_newThreadCalled = true;
|
||||
#if HAVE_PTHREAD_SIGNAL
|
||||
startSignalHandler();
|
||||
#endif
|
||||
}
|
||||
|
||||
lockMutex(m_threadMutex);
|
||||
|
||||
Reference in New Issue
Block a user