[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117601: Fix Gnus-related issues reported by David K
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r117601: Fix Gnus-related issues reported by David Kastrup <address@hidden> in |
Date: |
Mon, 28 Jul 2014 14:52:04 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117601
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2014-07-28 18:50:55 +0400
message:
Fix Gnus-related issues reported by David Kastrup <address@hidden> in
<http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
* atimer.c (timerfd_callback): Always read expiration data.
Add comment.
(turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
* process.c (add_timer_wait_descriptor): Add timer descriptor
to input_wait_mask and non_process_wait_mask as well.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/atimer.c atimer.c-20091113204419-o5vbwnq5f7feedwu-1759
src/process.c process.c-20091113204419-o5vbwnq5f7feedwu-462
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-07-28 09:39:09 +0000
+++ b/src/ChangeLog 2014-07-28 14:50:55 +0000
@@ -35,6 +35,14 @@
Define as no-op.
(adjust_frame_size): Always declare prototype.
+ Fix Gnus-related issues reported by David Kastrup <address@hidden> in
+ <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
+ * atimer.c (timerfd_callback): Always read expiration data.
+ Add comment.
+ (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
+ * process.c (add_timer_wait_descriptor): Add timer descriptor
+ to input_wait_mask and non_process_wait_mask as well.
+
2014-07-28 Paul Eggert <address@hidden>
* frame.c (x_set_frame_parameters): Don't use uninitialized locals.
=== modified file 'src/atimer.c'
--- a/src/atimer.c 2014-07-28 06:28:15 +0000
+++ b/src/atimer.c 2014-07-28 14:50:55 +0000
@@ -410,9 +410,19 @@
#ifdef HAVE_TIMERFD
+/* Called from wait_reading_process_output when FD, which
+ should be equal to TIMERFD, is available for reading. */
+
void
timerfd_callback (int fd, void *arg)
{
+ char buf[8];
+ ptrdiff_t nbytes;
+
+ eassert (fd == timerfd);
+ nbytes = emacs_read (fd, buf, sizeof (buf));
+ /* Just discard an expiration count for now. */
+ eassert (nbytes == sizeof (buf));
do_pending_atimers ();
}
@@ -442,7 +452,18 @@
if (on)
set_alarm ();
else
- alarm (0);
+ {
+#ifdef HAVE_TIMERFD
+ if (special_timer_available > 1)
+ {
+ struct itimerspec ispec;
+ memset (&ispec, 0, sizeof (ispec));
+ /* Writing zero expiration time should disarm it. */
+ timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0);
+ }
+#endif /* HAVE_TIMERFD */
+ alarm (0);
+ }
}
/* This is intended to use from automated tests. */
=== modified file 'src/process.c'
--- a/src/process.c 2014-07-28 06:28:15 +0000
+++ b/src/process.c 2014-07-28 14:50:55 +0000
@@ -6835,7 +6835,9 @@
void
add_timer_wait_descriptor (int fd)
{
+ FD_SET (fd, &input_wait_mask);
FD_SET (fd, &non_keyboard_wait_mask);
+ FD_SET (fd, &non_process_wait_mask);
fd_callback_info[fd].func = timerfd_callback;
fd_callback_info[fd].data = NULL;
fd_callback_info[fd].condition |= FOR_READ;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117601: Fix Gnus-related issues reported by David Kastrup <address@hidden> in,
Dmitry Antipov <=