From: Tomas Mudrunka Date: Fri, 25 Jun 2021 12:46:58 +0000 (+0200) Subject: docs X-Git-Url: http://git.harvie.cz/?p=mirrors%2FPrograms.git;a=commitdiff_plain;h=ae4849d11f804c0ea6c7ad4aea8a37702f3dd296 docs --- diff --git a/c/pthread_extra/README.md b/c/pthread_extra/README.md new file mode 100644 index 0000000..bf17f7e --- /dev/null +++ b/c/pthread_extra/README.md @@ -0,0 +1,10 @@ +# pthread_extra + +Library implementing extra features on top of POSIX threads. +Currently only tested on Linux. Mostly experimental code. + +### Components + + * pthread_msgqueue - implements message queues, more features than POSIX mqueue (no known issues, but not really tested) + * pthread_multi - lock multiple mutexes at once (might cause deadlocks in complex scenarios) + * pthread_pause - implements suspend/resume functionality for pthreads (causes deadlocks under high load) diff --git a/c/pthread_extra/pthread_pause.c b/c/pthread_extra/pthread_pause.c index 309016c..67a5023 100644 --- a/c/pthread_extra/pthread_pause.c +++ b/c/pthread_extra/pthread_pause.c @@ -11,6 +11,7 @@ void pthread_pause_handler() { sigfillset(&sigset); sigdelset(&sigset, PTHREAD_XSIG_CONT); sigsuspend(&sigset); + //int sig; sigwait(&sigset, &sig); } void pthread_pause_enable() {