[Top][All Lists]

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-69-g02a362

From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-69-g02a362a
Date: Mon, 05 Nov 2012 20:49:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  02a362a665ce462e4fe2409b2e2fc2c0007360f2 (commit)
      from  93825c9f0608ec85f17759b7d841927e6cf9f113 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 02a362a665ce462e4fe2409b2e2fc2c0007360f2
Author: Ludovic Courtès <address@hidden>
Date:   Mon Nov 5 21:43:13 2012 +0100

    Fix invalid assertion about mutex ownership in threads.c.
    * libguile/threads.c (do_thread_exit): Don't assert m->owner == t->handle
      since that is not the case when MUTEX was abandoned by T.  Reported by 
      Weaver and others.


Summary of changes:
 libguile/threads.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libguile/threads.c b/libguile/threads.c
index e8305b4..a3aee0f 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -696,10 +696,11 @@ do_thread_exit (void *v)
          scm_i_pthread_mutex_lock (&m->lock);
-         /* Since MUTEX is in `t->mutexes', T must be its owner.  */
-         assert (scm_is_eq (m->owner, t->handle));
-         unblock_from_queue (m->waiting);
+         /* Check whether T owns MUTEX.  This is usually the case, unless
+            T abandoned MUTEX; in that case, T is no longer its owner (see
+            `fat_mutex_lock') but MUTEX is still in `t->mutexes'.  */
+         if (scm_is_eq (m->owner, t->handle))
+           unblock_from_queue (m->waiting);
          scm_i_pthread_mutex_unlock (&m->lock);

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]