diff options
| author | David Lechner | 2020-02-18 12:24:23 -0600 |
|---|---|---|
| committer | Damien George | 2020-02-20 00:30:08 +1100 |
| commit | 4adcaa4423641a44df764058745274c522452ca5 (patch) | |
| tree | cf8544a1b68b89ddca157ac6e38c63f60509468b | |
| parent | 1fccda049ff601cc148c7bc99ae255f3d23db8e2 (diff) | |
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.
| -rw-r--r-- | ports/unix/mpthreadport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/unix/mpthreadport.c b/ports/unix/mpthreadport.c index 4cbba3ff3..4ee692341 100644 --- a/ports/unix/mpthreadport.c +++ b/ports/unix/mpthreadport.c @@ -39,7 +39,13 @@ #include <sched.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) +#else +#define MP_THREAD_GC_SIGNAL (SIGUSR1) +#endif // this structure forms a linked list, one node per active thread typedef struct _thread_t { |
