guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-13-186-g5


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-13-186-g557abc4
Date: Mon, 13 Dec 2010 19:27:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=557abc49787954f3cc715988e551c82e10c32fc2

The branch, master has been updated
       via  557abc49787954f3cc715988e551c82e10c32fc2 (commit)
      from  998191fd4f4b82d7ee8f40ecdb4db4187864c33e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 557abc49787954f3cc715988e551c82e10c32fc2
Author: Andy Wingo <address@hidden>
Date:   Mon Dec 13 20:25:36 2010 +0100

    fix bugs in primitive-poll
    
    * libguile/poll.c (scm_primitive_poll): Only mark POLLOUT for output
      ports. Don't override results from the syscall, add to them.

-----------------------------------------------------------------------

Summary of changes:
 libguile/poll.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/libguile/poll.c b/libguile/poll.c
index e4d430c..d61d519 100644
--- a/libguile/poll.c
+++ b/libguile/poll.c
@@ -151,14 +151,24 @@ scm_primitive_poll (SCM pollfds, SCM nfds, SCM ports, SCM 
timeout)
                 if (pt->read_pos < pt->read_end)
                   /* Buffered input waiting to be read. */
                   revents |= POLLIN;
-                if (pt->write_pos < pt->write_end)
+                if (SCM_OUTPUT_PORT_P (port) && pt->write_pos < pt->write_end)
                   /* Buffered output possible. */
                   revents |= POLLOUT;
               }
           }
 
-        if ((fds[i].revents = revents & fds[i].events))
-          rv++;
+        /* Mask in the events we are interested, and test if any are
+           interesting. */
+        if ((revents &= fds[i].events))
+          {
+            /* Could be the underlying fd is also ready for reading.  */
+            if (!fds[i].revents)
+              rv++;
+
+            /* In any case, add these events to whatever the syscall
+               set. */
+            fds[i].revents |= revents;
+          }
       }
 
   return scm_from_int (rv);


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]