mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
added flags for checking if we are inside process_run()
This commit is contained in:
parent
df9ece582b
commit
880b3df797
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: simEnvChange.c,v 1.3 2006/10/05 12:09:53 fros4943 Exp $
|
||||
* $Id: simEnvChange.c,v 1.4 2006/10/06 10:47:09 fros4943 Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -38,6 +38,7 @@
|
||||
extern const struct simInterface *simInterfaces[];
|
||||
|
||||
char simDontFallAsleep = 0;
|
||||
char simInsideProcessRun = 0;
|
||||
|
||||
int simProcessRunValue;
|
||||
int simEtimerPending;
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: simEnvChange.h,v 1.3 2006/10/05 12:09:53 fros4943 Exp $
|
||||
* $Id: simEnvChange.h,v 1.4 2006/10/06 10:47:09 fros4943 Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SIMENVCHANGE_H__
|
||||
@ -45,6 +45,7 @@ extern int simNextExpirationTime;
|
||||
|
||||
// Variable that when set to != 0, stops the mote from falling asleep next tick
|
||||
extern char simDontFallAsleep;
|
||||
extern char simInsideProcessRun;
|
||||
|
||||
// Definition for registering an interface
|
||||
#define SIM_INTERFACE(name, doActionsBeforeTick, doActionsAfterTick) \
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: code_main_template,v 1.7 2006/10/05 12:10:12 fros4943 Exp $
|
||||
* $Id: code_main_template,v 1.8 2006/10/06 10:47:33 fros4943 Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -116,7 +116,9 @@ start_process_run_loop(void *data)
|
||||
/* Always pretend we have processes left while inside process_run() */
|
||||
simProcessRunValue = 1;
|
||||
|
||||
simInsideProcessRun = 1;
|
||||
simProcessRunValue = process_run();
|
||||
simInsideProcessRun = 0;
|
||||
|
||||
// Check if we must stay awake
|
||||
if (simDontFallAsleep) {
|
||||
|
Loading…
Reference in New Issue
Block a user