From: Tomas Mudrunka Date: Tue, 29 Jun 2021 11:17:46 +0000 (+0200) Subject: Add to registry X-Git-Url: http://git.harvie.cz/?p=mirrors%2FPrograms.git;a=commitdiff_plain;h=ee099ba70d72016b26380b4532c0f9cfb73d484f Add to registry --- 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);