From: Jérémie Astor Date: Wed, 6 May 2020 18:06:52 +0000 (+0200) Subject: :bug: Window cond locks X-Git-Tag: nightly~1646 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5a1231f713ef315d73912e0630a4d8180e8b1748;p=gwion.git :bug: Window cond locks --- diff --git a/src/lib/shred.c b/src/lib/shred.c index fae26470..de943664 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -230,9 +230,9 @@ struct ThreadLauncher *tl = data; MUTEX_TYPE mutex = tl->mutex; const M_Object me = vm->shreduler->list->self->info->me; ++me->ref; - MUTEX_LOCK(mutex); + MUTEX_COND_LOCK(mutex); THREAD_COND_SIGNAL(FORK_COND(me)); - MUTEX_UNLOCK(mutex); + MUTEX_COND_UNLOCK(mutex); while(fork_running(vm, me)) { vm_run(vm); ++vm->bbq->pos; @@ -253,10 +253,10 @@ ANN void fork_launch(const M_Object o, const m_uint sz) { MUTEX_SETUP(FORK_MUTEX(o)); THREAD_COND_SETUP(FORK_COND(o)); struct ThreadLauncher tl = { .mutex=FORK_MUTEX(o), .cond=FORK_COND(o), .vm=ME(o)->info->vm }; - MUTEX_LOCK(tl.mutex); + MUTEX_COND_LOCK(tl.mutex); THREAD_CREATE(FORK_THREAD(o), fork_run, &tl); THREAD_COND_WAIT(FORK_COND(o), tl.mutex); - MUTEX_UNLOCK(tl.mutex); + MUTEX_COND_UNLOCK(tl.mutex); THREAD_COND_CLEANUP(FORK_COND(o)); MUTEX_CLEANUP(FORK_MUTEX(o)); } diff --git a/util b/util index 937c8243..9cad8647 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit 937c824377a2f609a0fa17869b04935301841427 +Subproject commit 9cad8647ebfe4024c2fb262fa42a2096d84fb183