Example:
Semaphores implemented using Conditional Critical
Regions
Shared: P(s): V(s):
struct
{ region sem when s>0
do region sem do
int s; s-=1; s+=1;
}
sem;