blob: ffd818c57e1850dcabe2c95a4f446ed3be6827c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Lock: module
{
PATH: con "/dis/lib/lock.dis";
Semaphore: adt {
c: chan of int;
obtain: fn(nil: self ref Semaphore);
release: fn(nil: self ref Semaphore);
new: fn(): ref Semaphore;
};
init: fn();
};
|