mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-28 07:50:48 -08:00
Make block_atimers unblock_atimers extern
This commit is contained in:
parent
71d61b05d4
commit
64dfd59fd6
2 changed files with 19 additions and 16 deletions
33
src/atimer.c
33
src/atimer.c
|
|
@ -65,22 +65,6 @@ 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. */
|
||||
|
||||
|
|
@ -165,6 +149,23 @@ 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. */
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue