diff options
| author | Yuuki Harano | 2021-11-13 16:02:46 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-11-13 16:02:46 +0900 |
| commit | c3377ae3b7fdb8714e03586589d1b2804cf08e17 (patch) | |
| tree | 09a7b945cc40c24176d2310869186ddba7b29541 /src | |
| parent | 60623aceed5486939c28fecf2790acd7e4ac6318 (diff) | |
| download | emacs-c3377ae3b7fdb8714e03586589d1b2804cf08e17.tar.gz emacs-c3377ae3b7fdb8714e03586589d1b2804cf08e17.zip | |
Revert atimer changes
They seem to be not needed any more.
* src/atimer.c (set_alarm): Revert
(turn_on_atimers): Revert
(have_buggy_timerfd): Revert
Diffstat (limited to 'src')
| -rw-r--r-- | src/atimer.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/atimer.c b/src/atimer.c index 197b504bf51..490c21bff16 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -310,13 +310,10 @@ set_alarm (void) | |||
| 310 | ispec.it_value = atimers->expiration; | 310 | ispec.it_value = atimers->expiration; |
| 311 | ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0; | 311 | ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0; |
| 312 | # ifdef HAVE_TIMERFD | 312 | # ifdef HAVE_TIMERFD |
| 313 | if (timerfd >= 0) | 313 | if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0) |
| 314 | { | 314 | { |
| 315 | if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0) | 315 | add_timer_wait_descriptor (timerfd); |
| 316 | { | 316 | exit = true; |
| 317 | add_timer_wait_descriptor (timerfd); | ||
| 318 | exit = true; | ||
| 319 | } | ||
| 320 | } | 317 | } |
| 321 | # endif | 318 | # endif |
| 322 | if (alarm_timer_ok | 319 | if (alarm_timer_ok |
| @@ -467,8 +464,7 @@ turn_on_atimers (bool on) | |||
| 467 | if (alarm_timer_ok) | 464 | if (alarm_timer_ok) |
| 468 | timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0); | 465 | timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0); |
| 469 | # ifdef HAVE_TIMERFD | 466 | # ifdef HAVE_TIMERFD |
| 470 | if (timerfd >= 0) | 467 | timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0); |
| 471 | timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0); | ||
| 472 | # endif | 468 | # endif |
| 473 | #endif | 469 | #endif |
| 474 | alarm (0); | 470 | alarm (0); |
| @@ -575,9 +571,6 @@ have_buggy_timerfd (void) | |||
| 575 | # ifdef CYGWIN | 571 | # ifdef CYGWIN |
| 576 | struct utsname name; | 572 | struct utsname name; |
| 577 | return uname (&name) < 0 || strverscmp (name.release, "3.0.2") < 0; | 573 | return uname (&name) < 0 || strverscmp (name.release, "3.0.2") < 0; |
| 578 | # elif defined HAVE_PGTK | ||
| 579 | /* pgtk emacs does not want timerfd. */ | ||
| 580 | return true; | ||
| 581 | # else | 574 | # else |
| 582 | return false; | 575 | return false; |
| 583 | # endif | 576 | # endif |