aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-10-12 17:35:58 +0200
committerLukas Larsson <[email protected]>2017-10-12 17:35:58 +0200
commita4a1d9cfed28dbff88e9a859417a968510fbf9b8 (patch)
treed5219c2ea57209103058960095d9ed456ffe8c24 /erts/emulator/beam/sys.h
parentc22a12456bb1f74d7fb2d586b163b320ed97122a (diff)
parent19c5a5f7f15d02395694b32090d1b24c3934c5d8 (diff)
downloadotp-a4a1d9cfed28dbff88e9a859417a968510fbf9b8.tar.gz
otp-a4a1d9cfed28dbff88e9a859417a968510fbf9b8.tar.bz2
otp-a4a1d9cfed28dbff88e9a859417a968510fbf9b8.zip
Merge branch 'lukas/erts/use_SIGRTMIN_for_sys_suspend/OTP-14682'
* lukas/erts/use_SIGRTMIN_for_sys_suspend/OTP-14682: erts: Use SIGRTMIN on linux for sys_suspend
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index e94348614d..bf7d310568 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -824,11 +824,16 @@ int erts_sys_unsetenv(char *key);
char *erts_read_env(char *key);
void erts_free_read_env(void *value);
-#if defined(ERTS_THR_HAVE_SIG_FUNCS) && !defined(ETHR_UNUSABLE_SIGUSRX)
+#if defined(ERTS_THR_HAVE_SIG_FUNCS) && \
+ (!defined(ETHR_UNUSABLE_SIGUSRX) || defined(SIGRTMIN))
extern void sys_thr_resume(erts_tid_t tid);
extern void sys_thr_suspend(erts_tid_t tid);
-#define ERTS_SYS_SUSPEND_SIGNAL SIGUSR2
-#endif
+#ifdef SIGRTMIN
+#define ERTS_SYS_SUSPEND_SIGNAL (SIGRTMIN+1)
+#else
+#define ERTS_SYS_SUSPEND_SIGNAL (SIGUSR2)
+#endif /* SIGRTMIN */
+#endif /* HAVE_SIG_FUNCS */
/* utils.c */