source: tests/preempt_longrun/create.c @ dc8511c

aaron-thesisarm-ehcleanup-dtorsdeferred_resnjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since dc8511c was dc8511c, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

first attempt at updating suffixes for test programs

  • Property mode set to 100644
File size: 449 bytes
RevLine 
[73abe95]1#include <kernel.hfa>
2#include <thread.hfa>
3#include <time.hfa>
[cd99ef1]4
[dc8511c]5#include "long_tests.hfa"
[7bdcac1]6
[cc3e4d0]7#ifndef PREEMPTION_RATE
[b9da9585]8#error PREEMPTION_RATE not defined in makefile
[cc3e4d0]9#endif
10
[8ad6533]11Duration default_preemption() {
[cc3e4d0]12        return PREEMPTION_RATE;
13}
14
[b9da9585]15static const unsigned long N = 60_000ul;
16
[0322865]17thread worker_t {};
[cc3e4d0]18
[1449d83]19void main(worker_t & this) {}
[cc3e4d0]20
21int main(int argc, char* argv[]) {
[d6ff3ff]22        processor p;
[7bdcac1]23        for(int i = 0; TEST(i < N); i++) {
[0322865]24                worker_t w[7];
[7bdcac1]25                KICK_WATCHDOG;
[cc3e4d0]26        }
[1449d83]27}
Note: See TracBrowser for help on using the repository browser.