Sensinode main variable optimsations:

r is now uint8_t, allocated to registers
len is uint16_t for more efficent arithmetic

(Changes replicated from the 253x port, originally
contributed by Philippe Retornaz - EPFL)
This commit is contained in:
George Oikonomou 2012-09-07 14:38:49 +01:00
parent cb168da729
commit 067fabe0f9

View File

@ -33,7 +33,7 @@ PROCESS_NAME(batmon_process);
#endif #endif
#if NETSTACK_CONF_SHORTCUTS #if NETSTACK_CONF_SHORTCUTS
static __data int len; static __data uint16_t len;
#endif #endif
#ifdef STARTUP_CONF_VERBOSE #ifdef STARTUP_CONF_VERBOSE
@ -59,7 +59,6 @@ extern volatile uint8_t sleep_flag;
#endif #endif
extern rimeaddr_t rimeaddr_node_addr; extern rimeaddr_t rimeaddr_node_addr;
static __data int r;
#if ENERGEST_CONF_ON #if ENERGEST_CONF_ON
static unsigned long irq_energest = 0; static unsigned long irq_energest = 0;
#define ENERGEST_IRQ_SAVE(a) do { \ #define ENERGEST_IRQ_SAVE(a) do { \
@ -287,6 +286,7 @@ main(void)
watchdog_start(); watchdog_start();
while(1) { while(1) {
uint8_t r;
do { do {
/* Reset watchdog and handle polls and events */ /* Reset watchdog and handle polls and events */
watchdog_periodic(); watchdog_periodic();