}
#endif
+static void block_signals(void)
+{
+#ifdef HAVE_PTHREAD_SIGMASK
+ sigset_t sigmask;
+
+ ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
+ assert(ret == 0);
+ ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
+ assert(ret == 0);
+#endif
+}
+
static void submit_action(enum action a)
{
const char data = a;
sk_out_assign(hd->sk_out);
-#ifdef HAVE_PTHREAD_SIGMASK
- {
- sigset_t sigmask;
-
/* Let another thread handle signals. */
- ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
- assert(ret == 0);
- ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
- assert(ret == 0);
- }
-#endif
+ block_signals();
fio_get_mono_time(&ts);
memcpy(&last_du, &ts, sizeof(ts));