Search
lxdream.org :: lxdream :: r638:d6dc39e935af
lxdream 0.9.1
released Jun 29
Download Now
changeset638:d6dc39e935af
parent637:6a284eff5311
child640:01b50fd48035
authornkeynes
dateFri Feb 15 09:36:38 2008 +0000 (12 years ago)
Fix SLEEP wakeup on IRQ to not screwup the slice_cycle
src/sh4/sh4.c
1.1 --- a/src/sh4/sh4.c Thu Feb 14 14:08:32 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;
.