Author: sthibault
Date: 2013-02-10 23:17:07 +0000 (Sun, 10 Feb 2013)
New Revision: 5488

Added:
   
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-select-EINTR.diff
   glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-setitimer.diff
   
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-single-select-timeout.diff
Removed:
   
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-select-EINTR.diff
   
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
   
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
Modified:
   glibc-package/branches/eglibc-2.17/debian/changelog
   glibc-package/branches/eglibc-2.17/debian/patches/series
Log:
rename patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff into
patches/hurd-i386/tg-single-select-timeout.diff,
patches/hurd-i386/unsubmitted-select-EINTR.diff into
patches/hurd-i386/tg-select-EINTR.diff,
patches/hurd-i386/unsubmitted-setitimer_fix.diff into
patches/hurd-i386/tg-setitimer.diff.


Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-07 07:48:38 UTC 
(rev 5487)
+++ glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-10 23:17:07 UTC 
(rev 5488)
@@ -1,6 +1,12 @@
 eglibc (2.17-0experimental3) UNRELEASED; urgency=low
 
-  * 
+  [ Samuel Thibault ]
+  * rename patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff into
+    patches/hurd-i386/tg-single-select-timeout.diff,
+    patches/hurd-i386/unsubmitted-select-EINTR.diff into
+    patches/hurd-i386/tg-select-EINTR.diff,
+    patches/hurd-i386/unsubmitted-setitimer_fix.diff into
+    patches/hurd-i386/tg-setitimer.diff.
 
  -- Adam Conrad <adcon...@0c3.net>  Thu, 07 Feb 2013 00:44:54 -0700
 

Copied: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-select-EINTR.diff
 (from rev 5487, 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-select-EINTR.diff)
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-select-EINTR.diff
                            (rev 0)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-select-EINTR.diff
    2013-02-10 23:17:07 UTC (rev 5488)
@@ -0,0 +1,30 @@
+We need to set MACH_RCV_INTERRUPT to avoid __mach_msg looping on signals, and
+then handle the interruption.
+
+---
+ hurdselect.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
+index 21ba5f4..8fb2931 100644
+--- a/hurd/hurdselect.c
++++ b/hurd/hurdselect.c
+@@ -335,7 +335,7 @@ _hurd_select (int nfds,
+       mach_msg_option_t options = (timeout == NULL ? 0 : MACH_RCV_TIMEOUT);
+       error_t msgerr;
+       while ((msgerr = __mach_msg (&msg.head,
+-                                 MACH_RCV_MSG | options,
++                                 MACH_RCV_MSG | MACH_RCV_INTERRUPT | options,
+                                  0, sizeof msg, portset, to,
+                                  MACH_PORT_NULL)) == MACH_MSG_SUCCESS)
+       {
+@@ -407,6 +407,9 @@ _hurd_select (int nfds,
+          effect a poll, so ERR is MACH_RCV_TIMED_OUT when the poll finds no
+          message waiting.  */
+       err = 0;
++      if (msgerr == MACH_RCV_INTERRUPTED)
++      /* Interruption on our side (e.g. signal reception).  */
++      err = EINTR;
+ 
+       if (got)
+       /* At least one descriptor is known to be ready now, so we will

Copied: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-setitimer.diff 
(from rev 5487, 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff)
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-setitimer.diff   
                            (rev 0)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-setitimer.diff   
    2013-02-10 23:17:07 UTC (rev 5488)
@@ -0,0 +1,85 @@
+Author: Richard Braun <rbr...@sceen.net>
+Date:   Wed Dec 26 16:31:14 2012 +0000
+
+    Fix Hurd implementation of setitimer.
+    
+    The preemptor sigcode doesn't match since the POSIX sigcode SI_TIMER is
+    used when SIGALRM is sent. In addition, The inline version of
+    hurd_preempt_signals doesn't update _hurdsig_preempted_set. For these
+    reasons, the preemptor would be skipped by post_signal.
+    
+    * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Fix preemptor setup.
+
+diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
+index 00cd0cc..39b30de 100644
+--- a/sysdeps/mach/hurd/setitimer.c
++++ b/sysdeps/mach/hurd/setitimer.c
+@@ -128,7 +128,8 @@ timer_thread (void)
+ 
+ /* Forward declaration.  */
+ static int setitimer_locked (const struct itimerval *new,
+-                           struct itimerval *old, void *crit);
++                           struct itimerval *old, void *crit,
++                           int hurd_siglocked);
+ 
+ static sighandler_t
+ restart_itimer (struct hurd_signal_preemptor *preemptor,
+@@ -142,7 +143,7 @@ restart_itimer (struct hurd_signal_preemptor *preemptor,
+   /* Either reload or disable the itimer.  */
+   __spin_lock (&_hurd_itimer_lock);
+   it.it_value = it.it_interval = _hurd_itimerval.it_interval;
+-  setitimer_locked (&it, NULL, NULL);
++  setitimer_locked (&it, NULL, NULL, 1);
+ 
+   /* Continue with normal delivery (or hold, etc.) of SIGALRM.  */
+   return SIG_ERR;
+@@ -154,7 +155,7 @@ restart_itimer (struct hurd_signal_preemptor *preemptor,
+ 
+ static int
+ setitimer_locked (const struct itimerval *new, struct itimerval *old,
+-                void *crit)
++                void *crit, int hurd_siglocked)
+ {
+   struct itimerval newval;
+   struct timeval now, remaining, elapsed;
+@@ -192,16 +193,19 @@ setitimer_locked (const struct itimerval *new, struct 
itimerval *old,
+        run `restart_itimer' each time a SIGALRM would arrive.  */
+       static struct hurd_signal_preemptor preemptor =
+       {
+-        __sigmask (SIGALRM), 0, 0,
++        __sigmask (SIGALRM), SI_TIMER, SI_TIMER,
+         &restart_itimer,
+       };
+-      __mutex_lock (&_hurd_siglock);
++      if (!hurd_siglocked)
++      __mutex_lock (&_hurd_siglock);
+       if (! preemptor.next && _hurdsig_preemptors != &preemptor)
+       {
+         preemptor.next = _hurdsig_preemptors;
+         _hurdsig_preemptors = &preemptor;
++        _hurdsig_preempted_set |= preemptor.signals;
+       }
+-      __mutex_unlock (&_hurd_siglock);
++      if (!hurd_siglocked)
++      __mutex_unlock (&_hurd_siglock);
+ 
+       if (_hurd_itimer_port == MACH_PORT_NULL)
+       {
+@@ -348,7 +352,7 @@ __setitimer (enum __itimer_which which, const struct 
itimerval *new,
+ 
+   crit = _hurd_critical_section_lock ();
+   __spin_lock (&_hurd_itimer_lock);
+-  return setitimer_locked (new, old, crit);
++  return setitimer_locked (new, old, crit, 0);
+ }
+ 
+ static void
+@@ -363,7 +367,7 @@ fork_itimer (void)
+   it = _hurd_itimerval;
+   it.it_value = it.it_interval;
+ 
+-  setitimer_locked (&it, NULL, NULL);
++  setitimer_locked (&it, NULL, NULL, 0);
+ 
+   (void) &fork_itimer;                /* Avoid gcc optimizing out the 
function.  */
+ }

Copied: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-single-select-timeout.diff
 (from rev 5487, 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff)
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-single-select-timeout.diff
                           (rev 0)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-single-select-timeout.diff
   2013-02-10 23:17:07 UTC (rev 5488)
@@ -0,0 +1,35 @@
+commit fffcbbb0b5ff8864086f7b58fdbb8aa4c71943d0
+Author: Richard Braun <rbr...@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:

Deleted: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-select-EINTR.diff
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-select-EINTR.diff
   2013-02-07 07:48:38 UTC (rev 5487)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-select-EINTR.diff
   2013-02-10 23:17:07 UTC (rev 5488)
@@ -1,30 +0,0 @@
-We need to set MACH_RCV_INTERRUPT to avoid __mach_msg looping on signals, and
-then handle the interruption.
-
----
- hurdselect.c |    7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
-index 21ba5f4..8fb2931 100644
---- a/hurd/hurdselect.c
-+++ b/hurd/hurdselect.c
-@@ -335,7 +335,7 @@ _hurd_select (int nfds,
-       mach_msg_option_t options = (timeout == NULL ? 0 : MACH_RCV_TIMEOUT);
-       error_t msgerr;
-       while ((msgerr = __mach_msg (&msg.head,
--                                 MACH_RCV_MSG | options,
-+                                 MACH_RCV_MSG | MACH_RCV_INTERRUPT | options,
-                                  0, sizeof msg, portset, to,
-                                  MACH_PORT_NULL)) == MACH_MSG_SUCCESS)
-       {
-@@ -407,6 +407,9 @@ _hurd_select (int nfds,
-          effect a poll, so ERR is MACH_RCV_TIMED_OUT when the poll finds no
-          message waiting.  */
-       err = 0;
-+      if (msgerr == MACH_RCV_INTERRUPTED)
-+      /* Interruption on our side (e.g. signal reception).  */
-+      err = EINTR;
- 
-       if (got)
-       /* At least one descriptor is known to be ready now, so we will

Deleted: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
  2013-02-07 07:48:38 UTC (rev 5487)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
  2013-02-10 23:17:07 UTC (rev 5488)
@@ -1,85 +0,0 @@
-Author: Richard Braun <rbr...@sceen.net>
-Date:   Wed Dec 26 16:31:14 2012 +0000
-
-    Fix Hurd implementation of setitimer.
-    
-    The preemptor sigcode doesn't match since the POSIX sigcode SI_TIMER is
-    used when SIGALRM is sent. In addition, The inline version of
-    hurd_preempt_signals doesn't update _hurdsig_preempted_set. For these
-    reasons, the preemptor would be skipped by post_signal.
-    
-    * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Fix preemptor setup.
-
-diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
-index 00cd0cc..39b30de 100644
---- a/sysdeps/mach/hurd/setitimer.c
-+++ b/sysdeps/mach/hurd/setitimer.c
-@@ -128,7 +128,8 @@ timer_thread (void)
- 
- /* Forward declaration.  */
- static int setitimer_locked (const struct itimerval *new,
--                           struct itimerval *old, void *crit);
-+                           struct itimerval *old, void *crit,
-+                           int hurd_siglocked);
- 
- static sighandler_t
- restart_itimer (struct hurd_signal_preemptor *preemptor,
-@@ -142,7 +143,7 @@ restart_itimer (struct hurd_signal_preemptor *preemptor,
-   /* Either reload or disable the itimer.  */
-   __spin_lock (&_hurd_itimer_lock);
-   it.it_value = it.it_interval = _hurd_itimerval.it_interval;
--  setitimer_locked (&it, NULL, NULL);
-+  setitimer_locked (&it, NULL, NULL, 1);
- 
-   /* Continue with normal delivery (or hold, etc.) of SIGALRM.  */
-   return SIG_ERR;
-@@ -154,7 +155,7 @@ restart_itimer (struct hurd_signal_preemptor *preemptor,
- 
- static int
- setitimer_locked (const struct itimerval *new, struct itimerval *old,
--                void *crit)
-+                void *crit, int hurd_siglocked)
- {
-   struct itimerval newval;
-   struct timeval now, remaining, elapsed;
-@@ -192,16 +193,19 @@ setitimer_locked (const struct itimerval *new, struct 
itimerval *old,
-        run `restart_itimer' each time a SIGALRM would arrive.  */
-       static struct hurd_signal_preemptor preemptor =
-       {
--        __sigmask (SIGALRM), 0, 0,
-+        __sigmask (SIGALRM), SI_TIMER, SI_TIMER,
-         &restart_itimer,
-       };
--      __mutex_lock (&_hurd_siglock);
-+      if (!hurd_siglocked)
-+      __mutex_lock (&_hurd_siglock);
-       if (! preemptor.next && _hurdsig_preemptors != &preemptor)
-       {
-         preemptor.next = _hurdsig_preemptors;
-         _hurdsig_preemptors = &preemptor;
-+        _hurdsig_preempted_set |= preemptor.signals;
-       }
--      __mutex_unlock (&_hurd_siglock);
-+      if (!hurd_siglocked)
-+      __mutex_unlock (&_hurd_siglock);
- 
-       if (_hurd_itimer_port == MACH_PORT_NULL)
-       {
-@@ -348,7 +352,7 @@ __setitimer (enum __itimer_which which, const struct 
itimerval *new,
- 
-   crit = _hurd_critical_section_lock ();
-   __spin_lock (&_hurd_itimer_lock);
--  return setitimer_locked (new, old, crit);
-+  return setitimer_locked (new, old, crit, 0);
- }
- 
- static void
-@@ -363,7 +367,7 @@ fork_itimer (void)
-   it = _hurd_itimerval;
-   it.it_value = it.it_interval;
- 
--  setitimer_locked (&it, NULL, NULL);
-+  setitimer_locked (&it, NULL, NULL, 0);
- 
-   (void) &fork_itimer;                /* Avoid gcc optimizing out the 
function.  */
- }

Deleted: 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
===================================================================
--- 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
      2013-02-07 07:48:38 UTC (rev 5487)
+++ 
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff
      2013-02-10 23:17:07 UTC (rev 5488)
@@ -1,35 +0,0 @@
-commit fffcbbb0b5ff8864086f7b58fdbb8aa4c71943d0
-Author: Richard Braun <rbr...@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/branches/eglibc-2.17/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series    2013-02-07 
07:48:38 UTC (rev 5487)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series    2013-02-10 
23:17:07 UTC (rev 5488)
@@ -108,9 +108,9 @@
 hurd-i386/tg-hurdsig-boot-fix.diff
 hurd-i386/submitted-libpthread-elf.diff
 hurd-i386/local-ulimit.diff
-hurd-i386/unsubmitted-single-hurdselect-timeout.diff
-hurd-i386/unsubmitted-setitimer_fix.diff
-hurd-i386/unsubmitted-select-EINTR.diff
+hurd-i386/tg-single-select-timeout.diff
+hurd-i386/tg-setitimer.diff
+hurd-i386/tg-select-EINTR.diff
 hurd-i386/cvs-libpthread_lock.diff
 
 i386/local-biarch.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1u4g8x-0008br...@vasks.debian.org

Reply via email to