Rev 822 | Rev 1104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 822 | Rev 1062 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | #define MAX_ORDER 8 |
42 | #define MAX_ORDER 8 |
43 | 43 | ||
44 | #define THREAD_RUNS 1 |
44 | #define THREAD_RUNS 1 |
45 | #define THREADS 8 |
45 | #define THREADS 8 |
46 | 46 | ||
47 | static void thread(void * arg); |
47 | static void falloc(void * arg); |
48 | static void failed(void); |
48 | static void failed(void); |
49 | 49 | ||
50 | static atomic_t thread_count; |
50 | static atomic_t thread_count; |
51 | 51 | ||
52 | void thread(void * arg) |
52 | void falloc(void * arg) |
53 | { |
53 | { |
54 | int status, order, run, allocated, i; |
54 | int status, order, run, allocated, i; |
55 | __u8 val = THREAD->tid % THREADS; |
55 | __u8 val = THREAD->tid % THREADS; |
56 | index_t k; |
56 | index_t k; |
57 | 57 | ||
Line 105... | Line 105... | ||
105 | 105 | ||
106 | atomic_set(&thread_count, THREADS); |
106 | atomic_set(&thread_count, THREADS); |
107 | 107 | ||
108 | for (i = 0; i < THREADS; i++) { |
108 | for (i = 0; i < THREADS; i++) { |
109 | thread_t * thrd; |
109 | thread_t * thrd; |
110 | thrd = thread_create(thread, NULL, TASK, 0); |
110 | thrd = thread_create(falloc, NULL, TASK, 0, "falloc"); |
111 | if (thrd) |
111 | if (thrd) |
112 | thread_ready(thrd); |
112 | thread_ready(thrd); |
113 | else |
113 | else |
114 | failed(); |
114 | failed(); |
115 | } |
115 | } |