mirror of
https://github.com/rodamaral/lsnes.git
synced 2025-04-02 10:42:15 -04:00
28 lines
447 B
C++
Executable file
28 lines
447 B
C++
Executable file
#include <nes/nes.hpp>
|
|
|
|
namespace NES {
|
|
|
|
Scheduler scheduler;
|
|
|
|
void Scheduler::enter() {
|
|
host_thread = co_active();
|
|
co_switch(thread);
|
|
}
|
|
|
|
void Scheduler::exit(ExitReason reason) {
|
|
exit_reason = reason;
|
|
thread = co_active();
|
|
co_switch(host_thread);
|
|
}
|
|
|
|
void Scheduler::power() {
|
|
}
|
|
|
|
void Scheduler::reset() {
|
|
host_thread = co_active();
|
|
thread = cpu.thread;
|
|
sync = SynchronizeMode::None;
|
|
exit_reason = ExitReason::UnknownEvent;
|
|
}
|
|
|
|
}
|