#include <9pm/u.h>
#include <9pm/libc.h>

void
main(int argc, char **argv)
{
	Lock lk;

	USED(argc);
	USED(argv);

	memset(&lk, 0, sizeof lk);
	lock(&lk);
	assert(!canlock(&lk));
	unlock(&lk);
	assert(canlock(&lk));
	print("so far so good; this should hang here\n");
	lock(&lk);
	assert(0);
}
