mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
Fix crasher in scm_system_async_mark_for_thread
* libguile/async.c (scm_system_async_mark_for_thread): Only signal the cond if there is a wait mutex.
This commit is contained in:
parent
9ac2c9942b
commit
3f23688f39
1 changed files with 6 additions and 3 deletions
|
@ -148,9 +148,12 @@ SCM_DEFINE (scm_system_async_mark_for_thread, "system-async-mark", 1, 1, 0,
|
|||
sleep_mutex locked while setting t->sleep_mutex and will only
|
||||
unlock it again while waiting on sleep_cond.
|
||||
*/
|
||||
scm_i_scm_pthread_mutex_lock (wake->mutex);
|
||||
scm_i_pthread_cond_signal (&t->sleep_cond);
|
||||
scm_i_pthread_mutex_unlock (wake->mutex);
|
||||
if (wake->mutex)
|
||||
{
|
||||
scm_i_scm_pthread_mutex_lock (wake->mutex);
|
||||
scm_i_pthread_cond_signal (&t->sleep_cond);
|
||||
scm_i_pthread_mutex_unlock (wake->mutex);
|
||||
}
|
||||
|
||||
if (wake->fd >= 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue