Rev 623 | Rev 1077 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 623 | Rev 1062 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | 37 | ||
38 | #include <arch.h> |
38 | #include <arch.h> |
39 | 39 | ||
40 | #define THREADS 5 |
40 | #define THREADS 5 |
41 | 41 | ||
42 | static void thread(void *data) |
42 | static void threadtest(void *data) |
43 | { |
43 | { |
44 | while(1) |
44 | while(1) |
45 | { |
45 | { |
46 | printf("%d\n",(int)(THREAD->tid)); |
46 | printf("%d\n",(int)(THREAD->tid)); |
47 | scheduler(); |
47 | scheduler(); |
Line 52... | Line 52... | ||
52 | { |
52 | { |
53 | thread_t *t; |
53 | thread_t *t; |
54 | int i; |
54 | int i; |
55 | 55 | ||
56 | for (i=0; i<THREADS; i++) { |
56 | for (i=0; i<THREADS; i++) { |
57 | if (!(t = thread_create(thread, NULL, TASK, 0))) |
57 | if (!(t = thread_create(threadtest, NULL, TASK, 0, "threadtest"))) |
58 | panic("could not create thread\n"); |
58 | panic("could not create thread\n"); |
59 | thread_ready(t); |
59 | thread_ready(t); |
60 | } |
60 | } |
61 | printf("ok\n"); |
61 | printf("ok\n"); |
62 | } |
62 | } |