Search
lxdream.org :: lxdream/src/sh4/sh4.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4.c
changeset 638:d6dc39e935af
prev619:0800a0137472
next669:ab344e42bca9
author nkeynes
date Fri Feb 15 09:36:38 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix SLEEP wakeup on IRQ to not screwup the slice_cycle
file annotate diff log raw
1.1 --- a/src/sh4/sh4.c Wed Jan 30 09:38:24 2008 +0000
1.2 +++ b/src/sh4/sh4.c Fri Feb 15 09:36:38 2008 +0000
1.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;
.