source: tests/preempt_longrun/processor.c @ 76beed8

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 76beed8 was 73abe95, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Replace extension-less headers with .hfa

  • Property mode set to 100644
File size: 578 bytes
Line 
1#include <kernel.hfa>
2#include <thread.hfa>
3#include <time.hfa>
4
5#include <unistd.h>
6
7#include "long_tests.h"
8
9#ifndef PREEMPTION_RATE
10#error PREEMPTION_RATE not defined in makefile
11#endif
12
13Duration default_preemption() {
14        return PREEMPTION_RATE;
15}
16
17static const unsigned long N = 50_000ul;
18
19int main(int argc, char* argv[]) {
20        processor * p[15];
21        for ( int pi = 0; pi < 15; pi++ ) {
22                p[pi] = new();
23        }
24        for ( int i = 0; TEST(i < N); i++) {
25                int pi = i % 15;
26                delete( p[pi] );
27                p[pi] = new();
28                KICK_WATCHDOG;
29        }
30        for ( int pi = 0; pi < 15; pi++ ) {
31                delete( p[pi] );
32        }
33}
Note: See TracBrowser for help on using the repository browser.