From: Ken Brown Date: Thu, 11 Nov 2021 20:09:24 +0000 (-0500) Subject: Don't start both timerfd and alarms on Cygwin X-Git-Tag: emacs-29.0.90~3668^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4f8ce78183e95bfbe649fb2ac43f3fe3492c782;p=emacs.git Don't start both timerfd and alarms on Cygwin * src/atimer.c (set_alarm) [CYGWIN]: Don't start both timerfd and alarms; this causes a slowdown. (Bug#51734) --- diff --git a/src/atimer.c b/src/atimer.c index 490c21bff16..9bde9c2446f 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -316,6 +316,13 @@ set_alarm (void) exit = true; } # endif + +# ifdef CYGWIN + /* Don't start both timerfd and alarms on Cygwin; this + causes a slowdown (bug#51734). */ + if (exit) + return; +# endif if (alarm_timer_ok && timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0) == 0) exit = true;