Changeset b067d9b for longrun_tests/processor.cfa
- Timestamp:
- Oct 29, 2019, 4:01:24 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 773db65, 9421f3d8
- Parents:
- 7951100 (diff), 8364209 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
longrun_tests/processor.cfa (moved) (moved from src/tests/preempt_longrun/processor.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
longrun_tests/processor.cfa
r7951100 rb067d9b 1 #include <kernel >2 #include <thread >3 #include <time >1 #include <kernel.hfa> 2 #include <thread.hfa> 3 #include <time.hfa> 4 4 5 5 #include <unistd.h> 6 7 #include "long_tests.hfa" 6 8 7 9 #ifndef PREEMPTION_RATE … … 13 15 } 14 16 15 static const unsigned long N = 5 _000ul;17 static const unsigned long N = 50_000ul; 16 18 17 19 int main(int argc, char* argv[]) { 18 20 processor * p[15]; 19 write(STDERR_FILENO, "Preparing\n", sizeof("Preparing\n"));20 21 for ( int pi = 0; pi < 15; pi++ ) { 21 22 p[pi] = new(); 22 23 } 23 write(STDERR_FILENO, "Starting\n", sizeof("Starting\n")); 24 for ( int i = 0; i < N; i++) { 24 for ( int i = 0; TEST(i < N); i++) { 25 25 int pi = i % 15; 26 26 delete( p[pi] ); 27 27 p[pi] = new(); 28 KICK_WATCHDOG; 28 29 } 29 write(STDERR_FILENO, "Stopping\n", sizeof("Stopping\n"));30 30 for ( int pi = 0; pi < 15; pi++ ) { 31 31 delete( p[pi] ); 32 32 } 33 write(STDERR_FILENO, "Done\n", sizeof("Done\n"));34 33 }
Note:
See TracChangeset
for help on using the changeset viewer.