Merge pull request #585 from chewi/pthread

Use -pthread flag and simplify pthread build logic
This commit is contained in:
Dom Rodriguez
2020-05-12 23:13:16 +01:00
committed by GitHub
4 changed files with 5 additions and 29 deletions

View File

@@ -54,9 +54,7 @@
# include "arch/unix/ArchConsoleUnix.h"
# include "arch/unix/ArchDaemonUnix.h"
# include "arch/unix/ArchLogUnix.h"
# if HAVE_PTHREAD
# include "arch/unix/ArchMultithreadPosix.h"
# endif
# include "arch/unix/ArchMultithreadPosix.h"
# include "arch/unix/ArchNetworkBSD.h"
# include "arch/unix/ArchSleepUnix.h"
# include "arch/unix/ArchStringUnix.h"

View File

@@ -36,17 +36,6 @@
#define SIGWAKEUP SIGUSR1
#if !HAVE_PTHREAD_SIGNAL
// boy, is this platform broken. forget about pthread signal
// handling and let signals through to every process. barrier
// 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
static
void
setSignalSet(sigset_t* sigset)
@@ -344,9 +333,7 @@ ArchMultithreadPosix::newThread(ThreadFunc func, void* data)
// can't tell the difference.
if (!m_newThreadCalled) {
m_newThreadCalled = true;
#if HAVE_PTHREAD_SIGNAL
startSignalHandler();
#endif
}
// note that the child thread will wait until we release this mutex