diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-08-27 21:47:10 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-08-27 21:47:10 +0200 |
commit | adb9c13ccfa6cba955c7700c9277f1e274ce3b8e (patch) | |
tree | bcdb709125d96dc9c7831770a37dedb4eed21ac8 | |
parent | 56b8c9e730f266ea290c6306f3c353f97b2ca5b7 (diff) |
remove two more bogus assertions, and add explanations
-rw-r--r-- | .topmsg | 17 | ||||
-rw-r--r-- | hurd/hurdexec.c | 1 | ||||
-rw-r--r-- | hurd/thread-cancel.c | 1 |
3 files changed, 16 insertions, 3 deletions
@@ -1,7 +1,22 @@ From: Samuel Thibault <samuel.thibault@ens-lyon.org> Subject: [PATCH] The critical section lock _can_ be held in these place. -At least since hurd_thread_cancel can be called by another thread. +At least since hurd_thread_cancel can be called by another thread and lock our +critical lock. + +http://bugs.debian.org/46859 + +“ +Thomas suggested that there is no need to take the critical section +lock. I believe that taking the critical section lock is necessary to +prevent the target thread from entering a signal handler. Roland will +look into the problem. +” + +Taking the critical section lock makes these assertions bogus. + +It happens that hurd_thread_cancel is only called from libports and inside +/hurd/term so this is rare in practice. 2006-08-05 Samuel Thibault <samuel.thibault@ens-lyon.org> diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c index 0ced7f32b4..1de90c0bc2 100644 --- a/hurd/hurdexec.c +++ b/hurd/hurdexec.c @@ -104,7 +104,6 @@ _hurd_exec (task_t task, file_t file, ss = _hurd_self_sigstate (); - assert (! __spin_lock_locked (&ss->critical_section_lock)); __spin_lock (&ss->critical_section_lock); __spin_lock (&ss->lock); diff --git a/hurd/thread-cancel.c b/hurd/thread-cancel.c index 2e8d91e7ba..eaf3d9e342 100644 --- a/hurd/thread-cancel.c +++ b/hurd/thread-cancel.c @@ -90,7 +90,6 @@ hurd_check_cancel (void) int cancel; __spin_lock (&ss->lock); - assert (! __spin_lock_locked (&ss->critical_section_lock)); cancel = ss->cancel; ss->cancel = 0; __spin_unlock (&ss->lock); |