aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/atimer.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/atimer.c b/src/atimer.c
index 9b198675ab4..802f3c6a596 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -583,15 +583,16 @@ init_atimer (void)
583 timerfd = (egetenv ("EMACS_IGNORE_TIMERFD") || have_buggy_timerfd () ? -1 : 583 timerfd = (egetenv ("EMACS_IGNORE_TIMERFD") || have_buggy_timerfd () ? -1 :
584 timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC)); 584 timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC));
585# endif 585# endif
586 if (timerfd < 0) 586 /* We're starting the alarms even if we have timerfd, because
587 { 587 timerfd events do not fired while Emacs Lisp is busy. This might
588 struct sigevent sigev; 588 or might not mean that the timerfd code doesn't really give us
589 sigev.sigev_notify = SIGEV_SIGNAL; 589 anything and should be removed, see discussion in bug#19776. */
590 sigev.sigev_signo = SIGALRM; 590 struct sigevent sigev;
591 sigev.sigev_value.sival_ptr = &alarm_timer; 591 sigev.sigev_notify = SIGEV_SIGNAL;
592 alarm_timer_ok 592 sigev.sigev_signo = SIGALRM;
593 = timer_create (CLOCK_REALTIME, &sigev, &alarm_timer) == 0; 593 sigev.sigev_value.sival_ptr = &alarm_timer;
594 } 594 alarm_timer_ok
595 = timer_create (CLOCK_REALTIME, &sigev, &alarm_timer) == 0;
595#endif 596#endif
596 free_atimers = stopped_atimers = atimers = NULL; 597 free_atimers = stopped_atimers = atimers = NULL;
597 598