Subversion Repositories HelenOS-historic

Rev

Rev 1061 | Rev 1073 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1061 Rev 1065
Line 30... Line 30...
30
#include <ipc.h>
30
#include <ipc.h>
31
#include <stdio.h>
31
#include <stdio.h>
32
#include <unistd.h>
32
#include <unistd.h>
33
#include <stdlib.h>
33
#include <stdlib.h>
34
#include <ns.h>
34
#include <ns.h>
-
 
35
#include <thread.h>
35
 
36
 
-
 
37
extern void utest(void *arg);
-
 
38
void utest(void *arg)
-
 
39
{
-
 
40
//  printf("Uspace thread created.\n");
-
 
41
    for (;;)
-
 
42
        ;
-
 
43
}
36
 
44
 
37
static void test_printf(void)
45
static void test_printf(void)
38
{
46
{
39
    printf("Simple text.\n");
47
    printf("Simple text.\n");
40
    printf("Now insert '%s' string.\n","this");
48
    printf("Now insert '%s' string.\n","this");
Line 174... Line 182...
174
   
182
   
175
}
183
}
176
 
184
 
177
int main(int argc, char *argv[])
185
int main(int argc, char *argv[])
178
{
186
{
-
 
187
    int tid;
-
 
188
    char *stack;
179
    version_print();
189
    version_print();
180
 
190
 
181
/*  test_printf(); */
191
/*  test_printf(); */
182
//  test_ping();
192
//  test_ping();
183
//  test_async_ipc();
193
//  test_async_ipc();
184
//  test_advanced_ipc();
194
//  test_advanced_ipc();
185
    test_connection_ipc();
195
    test_connection_ipc();
-
 
196
   
-
 
197
    stack = (char *) malloc(getpagesize());
-
 
198
    if (!stack) {
-
 
199
        printf("Malloc failed.\n");
-
 
200
    } else {
-
 
201
        if ((tid = thread_create(utest, NULL, stack, "utest") != -1)) {
-
 
202
            printf("Created thread tid=%d\n", tid);
-
 
203
        }
-
 
204
    }
-
 
205
   
186
    return 0;
206
    return 0;
187
}
207
}