sh4_sched: Handle disabled events correctly

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2015-05-07 22:03:55 +02:00
parent 20f7a41fe9
commit 4b46de89bb
1 changed files with 9 additions and 2 deletions

View File

@ -108,10 +108,17 @@ u64 sh4_sched_now64()
}
void sh4_sched_request(int id, int cycles)
{
verify(cycles <= SH4_MAIN_CLOCK);
verify(cycles== -1 || (cycles >= 0 && cycles <= SH4_MAIN_CLOCK));
list[id].start=sh4_sched_now();
list[id].end=list[id].start+cycles;
if (cycles == -1) {
list[id].end = -1;
}
else
{
list[id].end = list[id].start + cycles;
}
sh4_sched_ffts();
}