mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
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>
This commit is contained in:
parent
926bcc56f9
commit
78f2ea3bc8
@ -1607,51 +1607,6 @@ err:
|
|||||||
igt_assert_f(0, "failed to install the signal handler\n");
|
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 */
|
/* simulation enviroment support */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -667,8 +667,6 @@ typedef void (*igt_exit_handler_t)(int sig);
|
|||||||
|
|
||||||
/* reliable atexit helpers, also work when killed by a signal (if possible) */
|
/* reliable atexit helpers, also work when killed by a signal (if possible) */
|
||||||
void igt_install_exit_handler(igt_exit_handler_t fn);
|
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 */
|
/* helpers to automatically reduce test runtime in simulation */
|
||||||
bool igt_run_in_simulation(void);
|
bool igt_run_in_simulation(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user