#include <kernel>
#include <thread>

static const unsigned long N = 5_000ul;

#ifndef PREEMPTION_RATE
#define PREEMPTION_RATE 10_000ul
#endif

unsigned int default_preemption() {
	return PREEMPTION_RATE;
}

thread worker_t {};

void main(worker_t & this) {}

extern processor *   mainProcessor;
extern thread_desc * mainThread;

int main(int argc, char* argv[]) {
	for(int i = 0; i < N; i++) {
		assert(this_processor == mainProcessor);
		assert(this_thread == mainThread);
		processor p;
	}
}
