r5427 - in glibc-package/trunk/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2012-12-20 20:32:48 +0000 (Thu, 20 Dec 2012)
New Revision: 5427
Added:
glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff: Temporarily
fix double select timeout on single fd.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2012-12-07 02:40:25 UTC (rev 5426)
+++ glibc-package/trunk/debian/changelog 2012-12-20 20:32:48 UTC (rev 5427)
@@ -23,6 +23,8 @@
sigstate_is_global_rcv at boot in libpthread-based translators.
* patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Update with Thomas'
fork deadlock fix.
+ * patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff: Temporarily
+ fix double select timeout on single fd.
-- Adam Conrad <adconrad@0c3.net> Mon, 19 Nov 2012 14:23:26 -0700
Added: glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff 2012-12-20 20:32:48 UTC (rev 5427)
@@ -0,0 +1,35 @@
+commit fffcbbb0b5ff8864086f7b58fdbb8aa4c71943d0
+Author: Richard Braun <rbraun@sceen.net>
+Date: Mon Dec 17 09:57:41 2012 +0000
+
+ 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.
+
+---
+ hurdselect.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
+index 21ba5f4..a02c7be 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:
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2012-12-07 02:40:25 UTC (rev 5426)
+++ glibc-package/trunk/debian/patches/series 2012-12-20 20:32:48 UTC (rev 5427)
@@ -212,6 +212,7 @@
hurd-i386/submitted-fork_port_leak.diff
hurd-i386/libpthread_hurd_cond_wait.diff
hurd-i386/tg-hurdsig-boot-fix.diff
+hurd-i386/unsubmitted-single-hurdselect-timeout.diff
kfreebsd/submitted-libc_once.diff
kfreebsd/local-getaddrinfo-freebsd-kernel.diff
Reply to: