Subversion Repositories HelenOS

Rev

Rev 2854 | Rev 2877 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2801 svoboda 1
#include <stdio.h>
2
#include <unistd.h>
2850 svoboda 3
#include <thread.h>
2801 svoboda 4
#include "../tester.h"
5
 
2850 svoboda 6
volatile int done;
2801 svoboda 7
 
2850 svoboda 8
void t_proc(void *arg)
9
{
10
	printf("this is 'test' thread [wait for key]\n");
11
	getchar();
12
	done = 1;
13
}
2807 svoboda 14
 
2801 svoboda 15
char * test_debug1(bool quiet)
16
{
17
	int rc;
2850 svoboda 18
	thread_id_t tid;
2801 svoboda 19
 
2850 svoboda 20
	done = 0;
21
 
2801 svoboda 22
	printf("running debug1 test\n");
2850 svoboda 23
	rc = thread_create(t_proc, NULL, "test", &tid);
2801 svoboda 24
 
2854 svoboda 25
	//printf("(active) wait for thread 'test'\n");
2853 svoboda 26
	while (!done) {
2867 svoboda 27
		usleep(20000000);
2853 svoboda 28
		printf(".");
29
	}
2801 svoboda 30
 
31
	printf("done\n");
32
	return NULL;
33
}