source: tests/preempt_longrun/create.c @ 4dcaed2

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

Moved up many directories in source

  • Property mode set to 100644
File size: 435 bytes
RevLine 
[cc3e4d0]1#include <kernel>
2#include <thread>
[b9da9585]3#include <time>
[cd99ef1]4
[7bdcac1]5#include "long_tests.h"
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
[0322865c]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++) {
[0322865c]24                worker_t w[7];
[7bdcac1]25                KICK_WATCHDOG;
[cc3e4d0]26        }
[1449d83]27}
Note: See TracBrowser for help on using the repository browser.