aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2019-08-30 00:58:14 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-30 00:59:10 +0200
commit4b068090a0062500e4a254a98f5cd8a7d2c3c435 (patch)
treee20281f981b957f625e1df3009aac9cc2dd73d3f
parent23c1c256ae7b0f010d0fcaff60682b620887b164 (diff)
downloadglibc-4b068090a0062500e4a254a98f5cd8a7d2c3c435.zip
glibc-4b068090a0062500e4a254a98f5cd8a7d2c3c435.tar.gz
glibc-4b068090a0062500e4a254a98f5cd8a7d2c3c435.tar.bz2
hurd: Fix _hurd_select for single fd sets
The function attempts to optimize this case by performing one IPC system call with the timeout included among the parameters, but in the absence of a reply, it will call mach_msg again with the same timeout later, effectively doubling the total timeout of the select/poll call. Remove this optimization for the time being. * hurd/hurdselect.c (_hurd_select): Always call __io_select with no timeout.
-rw-r--r--ChangeLog5
-rw-r--r--hurd/hurdselect.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 87d43d4..06c8852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-30 Richard Braun <rbraun@sceen.net>
+
+ * hurd/hurdselect.c (_hurd_select): Always call __io_select with no
+ timeout.
+
2019-08-29 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
* elf/dl-addr.c (determine_info): Calculate the symbol index
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index 6997b2b..a5e6e26 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -236,10 +236,7 @@ _hurd_select (int nfds,
{
int type = d[i].type;
d[i].reply_port = __mach_reply_port ();
- err = __io_select (d[i].io_port, d[i].reply_port,
- /* Poll only if there's a single descriptor. */
- (firstfd == lastfd) ? to : 0,
- &type);
+ err = __io_select (d[i].io_port, d[i].reply_port, 0, &type);
switch (err)
{
case MACH_RCV_TIMED_OUT: