code: 9ferno

ref: fc8ce39f3c6691be1ff56d30e7fcdae786748517
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();
};