mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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 Mark Weaver and others.
This commit is contained in:
parent
93825c9f06
commit
02a362a665
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue