process customer
begin
repeat;
p(mutex);
if(count<n){
count=count+
v(customer);
p(barber);
理發
}
else{
v(mutex);
離開
}
until false
end
coend
end
思考
有
[
From:http://tw.wingwit.com/Article/program/czxt/201311/24277.html