#include <stdio.h>
#include <unistd.h>
#include <thread.h>
#include "../tester.h"

volatile int done;

void t_proc(void *arg)
{
	printf("this is 'test' thread [wait for key]\n");
	getchar();
	done = 1;
}

char * test_debug1(bool quiet)
{
	int rc;
	thread_id_t tid;

	done = 0;

	printf("running debug1 test\n");
	rc = thread_create(t_proc, NULL, "test", &tid);

	printf("(active) wait for thread 'test'\n");
	while (!done) usleep(500000);

	printf("done\n");
	return NULL;
}
