X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Frculfhash.c;h=17d31430f83653b3f309945f0e569e3af89db348;hb=22e3a77f65d53b84dbe653fa6cb83181cafe2482;hp=fed33e4574806969a768b01a777bc3c91a9eee03;hpb=54e31a4e859abba3222fcb62cf1244d0c6801543;p=urcu.git diff --git a/src/rculfhash.c b/src/rculfhash.c index fed33e4..17d3143 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -273,6 +273,7 @@ #include #include #include +#include #include #include #include @@ -2106,18 +2107,24 @@ static struct urcu_atfork cds_lfht_atfork = { .after_fork_child = cds_lfht_after_fork_child, }; -/* Block all signals to ensure we don't disturb the application. */ +/* + * Block all signals for the workqueue worker thread to ensure we don't + * disturb the application. The SIGRCU signal needs to be unblocked for + * the urcu-signal flavor. + */ static void cds_lfht_worker_init(struct urcu_workqueue *workqueue, void *priv) { int ret; sigset_t mask; - /* Block signal for entire process, so only our thread processes it. */ ret = sigfillset(&mask); if (ret) urcu_die(errno); - ret = pthread_sigmask(SIG_BLOCK, &mask, NULL); + ret = sigdelset(&mask, SIGRCU); + if (ret) + urcu_die(ret); + ret = pthread_sigmask(SIG_SETMASK, &mask, NULL); if (ret) urcu_die(ret); }