[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 9d9c828 025/100: TIMERFD support for PGTK, prevent calling
From: |
Yuuki Harano |
Subject: |
feature/pgtk 9d9c828 025/100: TIMERFD support for PGTK, prevent calling when timerfd<0 |
Date: |
Tue, 24 Nov 2020 08:02:29 -0500 (EST) |
branch: feature/pgtk
commit 9d9c8284fe224932f093e972b81e3c36fdce168b
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Jeff Walsh <fejfighter@gmail.com>
TIMERFD support for PGTK, prevent calling when timerfd<0
* ../src/atimer.c (set_alarm):
---
src/atimer.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/atimer.c b/src/atimer.c
index a7daf9d..df123e11 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -309,11 +309,13 @@ set_alarm (void)
ispec.it_value = atimers->expiration;
ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0;
# ifdef HAVE_TIMERFD
- if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
- {
- add_timer_wait_descriptor (timerfd);
- return;
- }
+ if (timerfd >= 0) {
+ if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
+ {
+ add_timer_wait_descriptor (timerfd);
+ return;
+ }
+ }
# endif
if (alarm_timer_ok
&& timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0) == 0)
@@ -461,7 +463,8 @@ turn_on_atimers (bool on)
if (alarm_timer_ok)
timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0);
# ifdef HAVE_TIMERFD
- timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0);
+ if (timerfd >= 0)
+ timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0);
# endif
#endif
alarm (0);
@@ -568,6 +571,9 @@ have_buggy_timerfd (void)
# ifdef CYGWIN
struct utsname name;
return uname (&name) < 0 || strverscmp (name.release, "3.0.2") < 0;
+# elif defined HAVE_PGTK
+ /* pgtk emacs does not want timerfd. */
+ return true;
# else
return false;
# endif
- branch feature/pgtk created (now d6ef9af), Yuuki Harano, 2020/11/24
- feature/pgtk 1b621c8 004/100: Don't mark name_list_element as it's not required, Yuuki Harano, 2020/11/24
- feature/pgtk 526f727 036/100: Let gtk handle scaling., Yuuki Harano, 2020/11/24
- feature/pgtk 68b99a3 021/100: Implement invisible-pointer to create blinking effect, Yuuki Harano, 2020/11/24
- feature/pgtk 53cb431 007/100: replace listn with list., Yuuki Harano, 2020/11/24
- feature/pgtk 592badc 014/100: Early toolbar improvements, Yuuki Harano, 2020/11/24
- feature/pgtk 9d9c828 025/100: TIMERFD support for PGTK, prevent calling when timerfd<0,
Yuuki Harano <=
- feature/pgtk fbba846 017/100: Addframe highlighting support, Yuuki Harano, 2020/11/24
- feature/pgtk 0056ca2 064/100: * src/pgtkterm.h: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk f761a09 065/100: * src/pgtkim.c: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 27a92f7 072/100: Add font chooser functionality, Yuuki Harano, 2020/11/24
- feature/pgtk 9752896 042/100: Bring pgtk more inline with X11-cairo builds, Yuuki Harano, 2020/11/24
- feature/pgtk 164800d 013/100: Add Preferred geometry settings, Yuuki Harano, 2020/11/24
- feature/pgtk 383ced7 071/100: Fix migrating Child frames, Yuuki Harano, 2020/11/24
- feature/pgtk 3b161dd 066/100: * src/pgtkselect.h: Change coding style, Yuuki Harano, 2020/11/24
- feature/pgtk 89cbe37 070/100: * src/keyboard.c (make_lispy_event): Fix coding style, Yuuki Harano, 2020/11/24
- feature/pgtk f6d8c59 001/100: Introduce Pure GTK3 port, Yuuki Harano, 2020/11/24