Rev 1787 | Rev 2027 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1787 | Rev 2021 | ||
|---|---|---|---|
| Line 35... | Line 35... | ||
| 35 | #include <proc/thread.h> |
35 | #include <proc/thread.h> |
| 36 | #include <time/delay.h> |
36 | #include <time/delay.h> |
| 37 | 37 | ||
| 38 | #include <arch.h> |
38 | #include <arch.h> |
| 39 | 39 | ||
| - | 40 | #ifdef mips32 |
|
| - | 41 | ||
| 40 | #define THREADS 50 |
42 | #define THREADS 50 |
| 41 | #define DELAY 10000L |
43 | #define DELAY 10000L |
| 42 | #define ATTEMPTS 5 |
44 | #define ATTEMPTS 5 |
| 43 | 45 | ||
| 44 | static atomic_t threads_ok; |
46 | static atomic_t threads_ok; |
| Line 103... | Line 105... | ||
| 103 | 105 | ||
| 104 | atomic_inc(&threads_ok); |
106 | atomic_inc(&threads_ok); |
| 105 | } |
107 | } |
| 106 | 108 | ||
| 107 | 109 | ||
| 108 | void test(void) |
110 | void test_mips2(void) |
| 109 | { |
111 | { |
| 110 | thread_t *t; |
112 | thread_t *t; |
| 111 | int i; |
113 | int i; |
| 112 | 114 | ||
| 113 | waitq_initialize(&can_start); |
115 | waitq_initialize(&can_start); |
| Line 132... | Line 134... | ||
| 132 | while (atomic_get(&threads_ok) != THREADS) |
134 | while (atomic_get(&threads_ok) != THREADS) |
| 133 | ; |
135 | ; |
| 134 | 136 | ||
| 135 | printf("Test passed.\n"); |
137 | printf("Test passed.\n"); |
| 136 | } |
138 | } |
| - | 139 | ||
| - | 140 | #else |
|
| - | 141 | ||
| - | 142 | void test_mips2(void) |
|
| - | 143 | { |
|
| - | 144 | printf("This test is availaible only on MIPS32 platform.\n"); |
|
| - | 145 | } |
|
| - | 146 | ||
| - | 147 | #endif |
|