revision 638:d6dc39e935af
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 638:d6dc39e935af |
parent | 637:6a284eff5311 |
child | 640:01b50fd48035 |
author | nkeynes |
date | Fri Feb 15 09:36:38 2008 +0000 (16 years ago) |
Fix SLEEP wakeup on IRQ to not screwup the slice_cycle
src/sh4/sh4.c | view | annotate | diff | log |
1.1 --- a/src/sh4/sh4.c Thu Feb 14 14:08:32 2008 +00001.2 +++ b/src/sh4/sh4.c Fri Feb 15 09:36:38 2008 +00001.3 @@ -388,6 +388,7 @@1.4 {1.5 int sleep_state = sh4r.sh4_state;1.6 assert( sleep_state != SH4_STATE_RUNNING );1.7 +1.8 while( sh4r.event_pending < nanosecs ) {1.9 sh4r.slice_cycle = sh4r.event_pending;1.10 if( sh4r.event_types & PENDING_EVENT ) {1.11 @@ -395,8 +396,7 @@1.12 }1.13 if( sh4r.event_types & PENDING_IRQ ) {1.14 sh4_wakeup();1.15 - nanosecs = sh4r.event_pending;1.16 - break;1.17 + return sh4r.slice_cycle;1.18 }1.19 }1.20 sh4r.slice_cycle = nanosecs;
.