#include #include #include #ifndef PREEMPTION_RATE #define PREEMPTION_RATE 10_000ul #endif unsigned int default_preemption() { return PREEMPTION_RATE; } thread worker_t {}; void main(worker_t * this) { volatile long p = 5_021_609ul; volatile long a = 326_417ul; volatile long n = 1l; for (volatile long i = 0; i < p; i++) { n *= a; n %= p; } if( n != a ) { abort(); } } extern "C" { static worker_t * workers; } int main(int argc, char* argv[]) { processor p; { worker_t w[7]; workers = w; } }