Add to registry
authorTomas Mudrunka <tomas@mudrunka.cz>
Tue, 29 Jun 2021 11:17:46 +0000 (13:17 +0200)
committerTomas Mudrunka <tomas@mudrunka.cz>
Tue, 29 Jun 2021 11:17:46 +0000 (13:17 +0200)
c/pthread_extra/pthread_pause.c

index 6df2e3a83c5f51bedecc93b2cde41ed615d3bc08..1eacdf498d049aa2f50e73219f0042375612b11d 100644 (file)
@@ -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);
This page took 0.162738 seconds and 4 git commands to generate.