// the thread is done, so close the thread.
if (process->state == controller_process_state_done) {
controller_thread_join(&process->id_thread);
+
+ f_thread_mutex_lock(&process->wait_lock);
+ f_thread_condition_signal_all(&process->wait);
+ f_thread_mutex_unlock(&process->wait_lock);
}
process->id = at;
process->state = controller_process_state_idle;
}
+ f_thread_mutex_lock(&process->wait_lock);
+ f_thread_condition_signal_all(&process->wait);
+ f_thread_mutex_unlock(&process->wait_lock);
+
f_thread_unlock(&process->lock);
}
process->state = controller_process_state_idle;
f_thread_unlock(&process->active);
+
+ f_thread_mutex_lock(&process->wait_lock);
+ f_thread_condition_signal_all(&process->wait);
+ f_thread_mutex_unlock(&process->wait_lock);
}
if (caller) {
process->state = controller_process_state_idle;
process->id_thread = 0;
+ f_thread_mutex_lock(&process->wait_lock);
+ f_thread_condition_signal_all(&process->wait);
+ f_thread_mutex_unlock(&process->wait_lock);
+
f_thread_unlock(&process->lock);
}
else {