File: scheduler.cpp

package info (click to toggle)
libretro-bsnes-mercury 094%2Bgit20160126-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,632 kB
  • sloc: cpp: 109,056; ansic: 3,097; makefile: 638; xml: 11; sh: 1
file content (28 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <fc/fc.hpp>

namespace Famicom {

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;
}

}