Fixes to support FreeBSD and Darwin.

This commit is contained in:
crs
2003-01-11 21:06:21 +00:00
parent 4bf0836eae
commit a14a462e22
8 changed files with 74 additions and 23 deletions

View File

@@ -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);