Subversion Repositories HelenOS

Rev

Rev 2854 | Rev 2877 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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