ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
|
Last change
on this file since b215e92b was 73abe95, checked in by Thierry Delisle <tdelisle@…>, 7 years ago |
|
Replace extension-less headers with .hfa
|
-
Property mode
set to
100644
|
|
File size:
602 bytes
|
| Line | |
|---|
| 1 | #include <kernel.hfa>
|
|---|
| 2 | #include <monitor.hfa>
|
|---|
| 3 | #include <thread.hfa>
|
|---|
| 4 | #include <time.hfa>
|
|---|
| 5 |
|
|---|
| 6 | #define __kick_rate 75000ul
|
|---|
| 7 | #include "long_tests.h"
|
|---|
| 8 |
|
|---|
| 9 | #ifndef PREEMPTION_RATE
|
|---|
| 10 | #error PREEMPTION_RATE not defined in makefile
|
|---|
| 11 | #endif
|
|---|
| 12 |
|
|---|
| 13 | Duration default_preemption() {
|
|---|
| 14 | return PREEMPTION_RATE;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | static const unsigned long N = 2_100_000ul;
|
|---|
| 18 |
|
|---|
| 19 | monitor mon_t {};
|
|---|
| 20 | void foo( mon_t & mutex this ) {
|
|---|
| 21 | KICK_WATCHDOG;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | mon_t mon;
|
|---|
| 25 | thread worker_t {};
|
|---|
| 26 | void main( worker_t & this ) {
|
|---|
| 27 | for( unsigned long i = 0; TEST(i < N); i++ ) {
|
|---|
| 28 | foo( mon );
|
|---|
| 29 | }
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | int main(int argc, char * argv[] ) {
|
|---|
| 33 | processor p;
|
|---|
| 34 | {
|
|---|
| 35 | worker_t w[7];
|
|---|
| 36 | }
|
|---|
| 37 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.