bug fix: wake up MSP430 when leaving rtimer interrupt if the rtimer polled a process.

thanks to Marco Vedovati for finding the bug
This commit is contained in:
fros4943 2009-10-06 09:21:46 +00:00
parent 5dd7f44162
commit b0291ca5a8

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: rtimer-arch.c,v 1.8 2008/12/02 12:44:48 joxe Exp $ * $Id: rtimer-arch.c,v 1.9 2009/10/06 09:21:46 fros4943 Exp $
*/ */
/** /**
@ -43,6 +43,7 @@
#include "sys/energest.h" #include "sys/energest.h"
#include "sys/rtimer.h" #include "sys/rtimer.h"
#include "sys/process.h"
#define DEBUG 0 #define DEBUG 0
#if DEBUG #if DEBUG
@ -56,6 +57,9 @@
interrupt(TIMERA0_VECTOR) timera0 (void) { interrupt(TIMERA0_VECTOR) timera0 (void) {
ENERGEST_ON(ENERGEST_TYPE_IRQ); ENERGEST_ON(ENERGEST_TYPE_IRQ);
rtimer_run_next(); rtimer_run_next();
if(process_nevents() > 0) {
LPM4_EXIT;
}
ENERGEST_OFF(ENERGEST_TYPE_IRQ); ENERGEST_OFF(ENERGEST_TYPE_IRQ);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/