diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-02-18 00:24:33 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-03-08 17:12:04 +0100 |
commit | 78f2ea3bc8ff450ea675919bcd1f3fc5747b8ee8 (patch) | |
tree | ef10e9c233bd8e74e6404197734f116e3d6f0b81 | |
parent | 926bcc56f97a5a3bea8d058f2c56bc575eaf024c (diff) |
lib/igt_core: remove igt_disable/enable_exit_handlers
No longer needed, and also not really a safe idea.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r-- | lib/igt_core.c | 45 | ||||
-rw-r--r-- | lib/igt_core.h | 2 |
2 files changed, 0 insertions, 47 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 5bbf13b5..6f4edb0c 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1607,51 +1607,6 @@ err: igt_assert_f(0, "failed to install the signal handler\n"); } -/** - * igt_disable_exit_handler: - * - * Temporarily disable all exit handlers. Useful for library code doing tricky - * things. - */ -void igt_disable_exit_handler(void) -{ - sigset_t set; - int i; - - if (exit_handler_disabled) - return; - - sigemptyset(&set); - for (i = 0; i < ARRAY_SIZE(handled_signals); i++) - sigaddset(&set, handled_signals[i].number); - - if (sigprocmask(SIG_BLOCK, &set, &saved_sig_mask)) { - perror("sigprocmask"); - return; - } - - exit_handler_disabled = true; -} - -/** - * igt_enable_exit_handler: - * - * Re-enable all exit handlers temporarily disabled with - * igt_disable_exit_handler(). - */ -void igt_enable_exit_handler(void) -{ - if (!exit_handler_disabled) - return; - - if (sigprocmask(SIG_SETMASK, &saved_sig_mask, NULL)) { - perror("sigprocmask"); - return; - } - - exit_handler_disabled = false; -} - /* simulation enviroment support */ /** diff --git a/lib/igt_core.h b/lib/igt_core.h index 9d4c9636..9314ae94 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -667,8 +667,6 @@ typedef void (*igt_exit_handler_t)(int sig); /* reliable atexit helpers, also work when killed by a signal (if possible) */ void igt_install_exit_handler(igt_exit_handler_t fn); -void igt_enable_exit_handler(void); -void igt_disable_exit_handler(void); /* helpers to automatically reduce test runtime in simulation */ bool igt_run_in_simulation(void); |