source:
svn/trunk/zas_dstar/hal/os/test/mymain.c
| Last change on this file was 2, checked in by jglee, 11 years ago | |
|---|---|
| File size: 350 bytes | |
| Rev | Line | |
|---|---|---|
| [2] | 1 | #include <stdio.h> |
| 2 | #include "dstoslayer.h" | |
| 3 | ||
| 4 | void test_thread(void *test) | |
| 5 | { | |
| 6 | int i; | |
| 7 | for(i=0;i<10;i++){ | |
| 8 | printf("%d\n",i); | |
| 9 | sleep(1); | |
| 10 | } | |
| 11 | printf("child thread ended\n"); | |
| 12 | } | |
| 13 | ||
| 14 | void main() | |
| 15 | { | |
| 16 | UINT32 taskid; | |
| 17 | printf("hello\n"); | |
| 18 | ||
| 19 | taskid = OS_SpawnTask(test_thread, "test", TASK_PRIOR_NORMAL, 1000, NULL); | |
| 20 | sleep(20); | |
| 21 | printf("main thread ended\n"); | |
| 22 | } |
Note: See TracBrowser
for help on using the repository browser.
