mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
Resolve a deadlock caused by not checking mutex state after calling `SCM_TICK'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
77554491e1
commit
1eb4952693
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-09-06 Julian Graham <joolean@gmail.com>
|
||||||
|
|
||||||
|
* threads.c (fat_mutex_lock): Resolve a deadlock caused by not
|
||||||
|
checking mutex state after calling `SCM_TICK'.
|
||||||
|
|
||||||
2008-08-20 Ludovic Courtès <ludo@gnu.org>
|
2008-08-20 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
* eval.c, filesys.c, gc.c, numbers.c, posix.c, srfi-14.c,
|
* eval.c, filesys.c, gc.c, numbers.c, posix.c, srfi-14.c,
|
||||||
|
|
|
@ -1030,9 +1030,9 @@ fat_mutex_lock (SCM mutex)
|
||||||
{
|
{
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
block_self (m->waiting, mutex, &m->lock, NULL);
|
|
||||||
if (scm_is_eq (m->owner, thread))
|
if (scm_is_eq (m->owner, thread))
|
||||||
break;
|
break;
|
||||||
|
block_self (m->waiting, mutex, &m->lock, NULL);
|
||||||
scm_i_pthread_mutex_unlock (&m->lock);
|
scm_i_pthread_mutex_unlock (&m->lock);
|
||||||
SCM_TICK;
|
SCM_TICK;
|
||||||
scm_i_scm_pthread_mutex_lock (&m->lock);
|
scm_i_scm_pthread_mutex_lock (&m->lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue