2011-01-07 11:11:56 +00:00
|
|
|
struct Scheduler : property<Scheduler> {
|
|
|
|
enum class SynchronizeMode : unsigned { None, CPU, All } sync;
|
|
|
|
enum class ExitReason : unsigned { UnknownEvent, StepEvent, FrameEvent, SynchronizeEvent };
|
|
|
|
readonly<ExitReason> exit_reason;
|
|
|
|
|
2010-12-28 06:03:02 +00:00
|
|
|
cothread_t host_thread;
|
|
|
|
cothread_t active_thread;
|
|
|
|
|
|
|
|
void enter();
|
2011-01-07 11:11:56 +00:00
|
|
|
void exit(ExitReason);
|
2010-12-28 06:03:02 +00:00
|
|
|
|
|
|
|
void init();
|
|
|
|
Scheduler();
|
|
|
|
};
|
|
|
|
|
|
|
|
extern Scheduler scheduler;
|