- File:
-
- 1 edited
-
src/tests/preempt_longrun/processor.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/preempt_longrun/processor.c
r85b1deb r863c413 2 2 #include <thread> 3 3 #include <time> 4 5 #include <unistd.h>6 4 7 5 #ifndef PREEMPTION_RATE … … 13 11 } 14 12 15 static const unsigned long N = 5 0_000ul;13 static const unsigned long N = 5_000ul; 16 14 17 15 int main(int argc, char* argv[]) { 18 16 processor * p[15]; 19 write(STDOUT_FILENO, "Preparing\n", sizeof("Preparing\n"));20 17 for ( int pi = 0; pi < 15; pi++ ) { 21 18 p[pi] = new(); 22 19 } 23 write(STDOUT_FILENO, "Starting\n", sizeof("Starting\n"));24 20 for ( int i = 0; i < N; i++) { 25 21 int pi = i % 15; … … 27 23 p[pi] = new(); 28 24 } 29 write(STDOUT_FILENO, "Stopping\n", sizeof("Stopping\n"));30 25 for ( int pi = 0; pi < 15; pi++ ) { 31 26 delete( p[pi] ); 32 27 } 33 write(STDOUT_FILENO, "Done\n", sizeof("Done\n"));34 28 }
Note:
See TracChangeset
for help on using the changeset viewer.