code: 9ferno

ref: c88203b29aa39982ea701c083bb0d6bb2ea0483b
dir: /module/lock.m/

View raw version
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();
};