diff options
author | Lukas Larsson <[email protected]> | 2017-10-12 17:35:58 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-10-12 17:35:58 +0200 |
commit | a4a1d9cfed28dbff88e9a859417a968510fbf9b8 (patch) | |
tree | d5219c2ea57209103058960095d9ed456ffe8c24 /erts/emulator/beam | |
parent | c22a12456bb1f74d7fb2d586b163b320ed97122a (diff) | |
parent | 19c5a5f7f15d02395694b32090d1b24c3934c5d8 (diff) | |
download | otp-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')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 6 | ||||
-rw-r--r-- | erts/emulator/beam/sys.h | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 17c936f041..27bbf70c0b 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -3674,6 +3674,12 @@ BIF_RETTYPE erts_debug_get_internal_state_1(BIF_ALIST_1) Eterm *hp = HAlloc(BIF_P, hsz); BIF_RET(uword_to_big(size, hp)); } + } else if (ERTS_IS_ATOM_STR("scheduler_dump", BIF_ARG_1)) { +#if defined(ERTS_HAVE_TRY_CATCH) && defined(ERTS_SYS_SUSPEND_SIGNAL) + BIF_RET(am_true); +#else + BIF_RET(am_false); +#endif } } else if (is_tuple(BIF_ARG_1)) { 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 */ |