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

r5428 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2012-12-26 16:45:59 +0000 (Wed, 26 Dec 2012)
New Revision: 5428

Added:
   glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
Fix Hurd implementation of setitimer.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2012-12-20 20:32:48 UTC (rev 5427)
+++ glibc-package/trunk/debian/changelog	2012-12-26 16:45:59 UTC (rev 5428)
@@ -25,6 +25,8 @@
     fork deadlock fix.
   * patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff: Temporarily
     fix double select timeout on single fd.
+  * patches/hurd-i386/unsubmitted-setitimer_fix.diff: Fix Hurd implementation
+    of setitimer.
 
  -- Adam Conrad <adconrad@0c3.net>  Mon, 19 Nov 2012 14:23:26 -0700
 

Added: glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-setitimer_fix.diff	2012-12-26 16:45:59 UTC (rev 5428)
@@ -0,0 +1,34 @@
+commit c09eae7f3f6c714da378baa492414f73974f3a69
+Author: Richard Braun <rbraun@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 fe057c9..8c0d92d 100644
+--- a/sysdeps/mach/hurd/setitimer.c
++++ b/sysdeps/mach/hurd/setitimer.c
+@@ -192,7 +192,7 @@ 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);
+@@ -200,6 +200,7 @@ setitimer_locked (const struct itimerval *new, struct itimerval *old,
+ 	{
+ 	  preemptor.next = _hurdsig_preemptors;
+ 	  _hurdsig_preemptors = &preemptor;
++	  _hurdsig_preempted_set |= preemptor.signals;
+ 	}
+       __mutex_unlock (&_hurd_siglock);
+ 

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2012-12-20 20:32:48 UTC (rev 5427)
+++ glibc-package/trunk/debian/patches/series	2012-12-26 16:45:59 UTC (rev 5428)
@@ -213,6 +213,7 @@
 hurd-i386/libpthread_hurd_cond_wait.diff
 hurd-i386/tg-hurdsig-boot-fix.diff
 hurd-i386/unsubmitted-single-hurdselect-timeout.diff
+hurd-i386/unsubmitted-setitimer_fix.diff
 
 kfreebsd/submitted-libc_once.diff
 kfreebsd/local-getaddrinfo-freebsd-kernel.diff


Reply to: