The waiter for a barrier must check both that it was signaled and that the barrier is enabled.

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-06 23:07:22 +02:00
parent b053cd80ec
commit defc12c1bc

View file

@ -104,8 +104,12 @@ static cl_object
barrier_wait_condition(cl_env_ptr env, cl_object barrier)
{
cl_object output;
/* We were signaled */
if (env->own_process->process.waiting_for != barrier)
return Ct;
/* Disabled barrier */
else if (barrier->barrier.arrivers_count < 0)
return Ct;
else
return Cnil;
}