From ae4849d11f804c0ea6c7ad4aea8a37702f3dd296 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Fri, 25 Jun 2021 14:46:58 +0200 Subject: [PATCH] docs --- c/pthread_extra/README.md | 10 ++++++++++ c/pthread_extra/pthread_pause.c | 1 + 2 files changed, 11 insertions(+) create mode 100644 c/pthread_extra/README.md 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() { -- 2.30.2