summaryrefslogtreecommitdiff
path: root/hurd/hurdselect.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-20 00:44:45 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-20 00:44:45 +0100
commit604efaa3acb8cec0c4f8014cfadffdb5481df8f3 (patch)
tree4579ef6c27083b83172dd8d0bc8b68ce843fd71a /hurd/hurdselect.c
parent771f49d2ccbe999060fdd7121c5a16439d0c9d94 (diff)
Add comments and changelog
Diffstat (limited to 'hurd/hurdselect.c')
-rw-r--r--hurd/hurdselect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index d0214cb6df..58ded4e7a8 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -305,6 +305,8 @@ _hurd_select (int nfds,
}
}
+ /* GOT is the number of replies (or errors), while READY is the number of
+ replies with at least one type bit set. */
ready = 0;
/* Now wait for reply messages. */
@@ -351,6 +353,8 @@ _hurd_select (int nfds,
mach_msg_option_t options;
error_t msgerr;
+ /* We rely on servers to implement the timeout, but when there are none,
+ do it on the client side. */
if (timeout != NULL && firstfd == -1)
{
options = MACH_RCV_TIMEOUT;
@@ -392,6 +396,8 @@ _hurd_select (int nfds,
err = EINTR;
goto poll;
}
+ /* Keep in mind msg.success.result can be 0 if a timeout
+ occurred. */
if (msg.error.err ||
#ifdef MACH_MSG_TYPE_BIT
msg.success.result_type.word != inttype.word ||