From ee099ba70d72016b26380b4532c0f9cfb73d484f Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Tue, 29 Jun 2021 13:17:46 +0200 Subject: [PATCH] Add to registry --- c/pthread_extra/pthread_pause.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/c/pthread_extra/pthread_pause.c b/c/pthread_extra/pthread_pause.c index 6df2e3a..1eacdf4 100644 --- a/c/pthread_extra/pthread_pause.c +++ b/c/pthread_extra/pthread_pause.c @@ -25,6 +25,9 @@ void pthread_pause_handler() { } void pthread_pause_enable() { + //Add thread to internal registry + pthread_user_data_internal(pthread_self()); + //Nesting signals too deep is not good for stack //You can get runtime stats using following command: //grep -i sig /proc/$(pgrep binary)/status @@ -42,6 +45,9 @@ void pthread_pause_enable() { } void pthread_pause_disable() { + //Add thread to internal registry + pthread_user_data_internal(pthread_self()); + //Block signal sigset_t sigset; sigemptyset(&sigset); -- 2.30.2