Subversion Repositories HelenOS

Rev

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

Rev 2867 Rev 2877
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
#include <vfs/vfs.h>
-
 
16
#include <errno.h>
-
 
17
 
15
char * test_debug1(bool quiet)
18
char * test_debug1(bool quiet)
16
{
19
{
17
    int rc;
20
    int rc;
18
    thread_id_t tid;
21
    thread_id_t tid;
19
 
22
 
20
    done = 0;
23
    done = 0;
21
 
24
 
-
 
25
    getchar();
-
 
26
    if (mount("tmpfs", "/", "nulldev0") != EOK)
-
 
27
        return "mount() failed.\n";
-
 
28
    getchar();
-
 
29
 
22
    printf("running debug1 test\n");
30
//  printf("running debug1 test\n");
23
    rc = thread_create(t_proc, NULL, "test", &tid);
31
//  rc = thread_create(t_proc, NULL, "test", &tid);
24
 
32
 
25
    //printf("(active) wait for thread 'test'\n");
33
    //printf("(active) wait for thread 'test'\n");
26
    while (!done) {
34
//  while (!done) {
27
        usleep(20000000);
35
//      usleep(20000000);
28
        printf(".");
36
//      printf(".");
29
    }
37
//  }
30
 
38
 
31
    printf("done\n");
39
//  printf("done\n");
32
    return NULL;
40
    return NULL;
33
}
41
}
34
 
42