struct lock a;
struct lock b;

void thread_fn() {
	lock_acquire(&b);
	lock_acquire(&a);

	lock_release(&a);
	lock_release(&b);
}

int main(void) {
	lock_init(&a);
	lock_init(&b);

	thread_new(&thread_fn);

	lock_acquire(&a);
	lock_acquire(&b);

	lock_release(&b);
	lock_release(&a);

	return 0;
}
