From 3b696d1cdcc79505313b2f087fbf742e503a1998 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 1 Sep 2019 11:07:11 +0200 Subject: [PATCH] Revert "Make block_atimers unblock_atimers extern" This reverts commit 4266794ceb30ba8c3465fb8568695f53b676247d. --- src/atimer.c | 33 ++++++++++++++++----------------- src/atimer.h | 2 -- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/atimer.c b/src/atimer.c index 4b0cab14530..a7daf9dcf5b 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -65,6 +65,22 @@ enum { timerfd = -1 }; # endif #endif +/* Block/unblock SIGALRM. */ + +static void +block_atimers (sigset_t *oldset) +{ + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGALRM); + sigaddset (&blocked, SIGINT); + pthread_sigmask (SIG_BLOCK, &blocked, oldset); +} +static void +unblock_atimers (sigset_t const *oldset) +{ + pthread_sigmask (SIG_SETMASK, oldset, 0); +} /* Function prototypes. */ @@ -149,23 +165,6 @@ start_atimer (enum atimer_type type, struct timespec timestamp, return t; } -/* Block/unblock SIGALRM. */ - -void -block_atimers (sigset_t *oldset) -{ - sigset_t blocked; - sigemptyset (&blocked); - sigaddset (&blocked, SIGALRM); - sigaddset (&blocked, SIGINT); - pthread_sigmask (SIG_BLOCK, &blocked, oldset); -} - -void -unblock_atimers (sigset_t const *oldset) -{ - pthread_sigmask (SIG_SETMASK, oldset, 0); -} /* Cancel and free atimer TIMER. */ diff --git a/src/atimer.h b/src/atimer.h index 58209168afb..660d77c9392 100644 --- a/src/atimer.h +++ b/src/atimer.h @@ -71,8 +71,6 @@ struct atimer struct atimer *start_atimer (enum atimer_type, struct timespec, atimer_callback, void *); -void block_atimers (sigset_t *); -void unblock_atimers (sigset_t const *); void cancel_atimer (struct atimer *); void do_pending_atimers (void); void init_atimer (void); -- 2.39.5