summaryrefslogtreecommitdiff
path: root/tools/perf/ui/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/setup.c')
-rw-r--r--tools/perf/ui/setup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c
index 25ded88801a3..ff800047e697 100644
--- a/tools/perf/ui/setup.c
+++ b/tools/perf/ui/setup.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <dlfcn.h>
+#include <signal.h>
#include <unistd.h>
#include <subcmd/pager.h>
@@ -120,3 +121,21 @@ void exit_browser(bool wait_for_ok)
}
mutex_destroy(&ui__lock);
}
+
+void pthread__block_sigwinch(void)
+{
+ sigset_t set;
+
+ sigemptyset(&set);
+ sigaddset(&set, SIGWINCH);
+ pthread_sigmask(SIG_BLOCK, &set, NULL);
+}
+
+void pthread__unblock_sigwinch(void)
+{
+ sigset_t set;
+
+ sigemptyset(&set);
+ sigaddset(&set, SIGWINCH);
+ pthread_sigmask(SIG_UNBLOCK, &set, NULL);
+}