aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-05-22 17:28:11 +0200
committerLukas Larsson <[email protected]>2017-10-12 17:34:57 +0200
commit19c5a5f7f15d02395694b32090d1b24c3934c5d8 (patch)
tree000235e7e3ee80978a9c20f5a50dd5c344b4c792 /erts/emulator/beam/sys.h
parent4c42d5b93e32444f185043e74c9b408cd76dc661 (diff)
downloadotp-19c5a5f7f15d02395694b32090d1b24c3934c5d8.tar.gz
otp-19c5a5f7f15d02395694b32090d1b24c3934c5d8.tar.bz2
otp-19c5a5f7f15d02395694b32090d1b24c3934c5d8.zip
erts: Use SIGRTMIN on linux for sys_suspend
The Linux real-time signal is better used on Linux for suspending schedulers during shutdown as it doesn't collide with SIGUSR2 usage of other applications.
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 615f44364b..9dc339053f 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -832,11 +832,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 */