ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 4b1c8da was
e8fe5e0,
checked in by tdelisle <tdelisle@…>, 6 years ago
|
Fixing longrun_tests to compile
|
-
Property mode set to
100644
|
File size:
629 bytes
|
Line | |
---|
1 | #include <kernel.hfa> |
---|
2 | #include <thread.hfa> |
---|
3 | #include <time.hfa> |
---|
4 | |
---|
5 | #define __kick_rate 550000ul |
---|
6 | #include "long_tests.hfa" |
---|
7 | |
---|
8 | #ifndef PREEMPTION_RATE |
---|
9 | #error PREEMPTION_RATE not defined in makefile |
---|
10 | #endif |
---|
11 | |
---|
12 | Duration default_preemption() { |
---|
13 | return PREEMPTION_RATE; |
---|
14 | } |
---|
15 | |
---|
16 | #ifdef TEST_LONG |
---|
17 | static const unsigned long N = 9_750_000ul; |
---|
18 | #else |
---|
19 | static const unsigned long N = 325_000ul; |
---|
20 | #endif |
---|
21 | |
---|
22 | thread worker_t {}; |
---|
23 | |
---|
24 | void main(worker_t & this) { |
---|
25 | for(int i = 0; TEST(i < N); i++) { |
---|
26 | yield(); |
---|
27 | KICK_WATCHDOG; |
---|
28 | } |
---|
29 | } |
---|
30 | |
---|
31 | extern "C" { |
---|
32 | static worker_t * workers; |
---|
33 | } |
---|
34 | |
---|
35 | int main(int argc, char* argv[]) { |
---|
36 | processor p; |
---|
37 | { |
---|
38 | worker_t w[7]; |
---|
39 | workers = w; |
---|
40 | } |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.