Rev 1152 | Rev 1197 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1152 | Rev 1175 | ||
---|---|---|---|
Line 31... | Line 31... | ||
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 | #include <thread.h> |
- | 36 | #include <task.h> |
|
36 | #include <psthread.h> |
37 | #include <psthread.h> |
37 | #include <futex.h> |
38 | #include <futex.h> |
38 | 39 | ||
39 | int a; |
40 | int a; |
40 | atomic_t ftx; |
41 | atomic_t ftx; |
Line 286... | Line 287... | ||
286 | // test_advanced_ipc(); |
287 | // test_advanced_ipc(); |
287 | // test_connection_ipc(); |
288 | // test_connection_ipc(); |
288 | // test_hangup(); |
289 | // test_hangup(); |
289 | // test_slam(); |
290 | // test_slam(); |
290 | 291 | ||
- | 292 | printf("Userspace task, taskid=%llX\n", get_task_id()); |
|
- | 293 | ||
291 | futex_initialize(&ftx, 1); |
294 | futex_initialize(&ftx, 1); |
292 | if (futex_down(&ftx) < 0) |
295 | if (futex_down(&ftx) < 0) |
293 | printf("Futex failed.\n"); |
296 | printf("Futex failed.\n"); |
294 | if (futex_up(&ftx) < 0) |
297 | if (futex_up(&ftx) < 0) |
295 | printf("Futex failed.\n"); |
298 | printf("Futex failed.\n"); |