bool done;
struct lock done_lock;

void thread_fn(void) {
	bool exit = false;
	while (!exit) {
		lock_acquire(&done_lock);
		exit = done;
		lock_release(&done_lock);
	}

	/* lock_acquire(&done_lock); */
	/* done = true; */
	/* lock_release(&done_lock); */
}

int main(void) {
	lock_init(&done_lock);

	thread_new(&thread_fn);

	lock_acquire(&done_lock);
	done = true;
	lock_release(&done_lock);
	/* bool exit = false; */
	/* while (!exit) { */
	/* 	lock_acquire(&done_lock); */
	/* 	exit = done; */
	/* 	lock_release(&done_lock); */
	/* } */

	return 0;
}
