- wait operation
wait(S1);
C--;
if (C < 0)
{
signal(S1);
wait(S2);
}
signal(S1);
- signal operation
wait(S1);
C ++;
if (C <= 0)
signal(S2);
else
signal(S1);
No comments:
Post a Comment