summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/unix/mpthreadport.c6
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 {