unix/mpthreadport: Fix Mac build by using SIGUSR1 if SIGRTMIN not avail.

Some platforms, like Apple, don't define SIGRTMIN, so fall back to SIGUSR1
in such a case.

Fixes #5659.
This commit is contained in:
David Lechner 2020-02-18 12:24:23 -06:00 committed by Damien George
parent 1fccda049f
commit 4adcaa4423

View File

@ -39,7 +39,13 @@
#include <sched.h> #include <sched.h>
#include <semaphore.h> #include <semaphore.h>
// Some platforms don't have SIGRTMIN but if we do have it, use it to avoid
// potential conflict with other uses of the more commonly used SIGUSR1.
#ifdef SIGRTMIN
#define MP_THREAD_GC_SIGNAL (SIGRTMIN + 5) #define MP_THREAD_GC_SIGNAL (SIGRTMIN + 5)
#else
#define MP_THREAD_GC_SIGNAL (SIGUSR1)
#endif
// this structure forms a linked list, one node per active thread // this structure forms a linked list, one node per active thread
typedef struct _thread_t { typedef struct _thread_t {