From b3f2bba3ecd4d0284dc57467164762ac5c1521ee Mon Sep 17 00:00:00 2001 From: Hardy Date: Wed, 13 Apr 2016 18:12:47 +0200 Subject: [PATCH] Removed some unnecessary statics in do_event() and process_post(). This allows the optimizer to put the corresponding variables into registers. See also discussion about other static variables: https://sourceforge.net/p/contiki/mailman/message/35010460/ --- core/sys/process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/sys/process.c b/core/sys/process.c index b2ed5701c..f98057cd3 100644 --- a/core/sys/process.c +++ b/core/sys/process.c @@ -245,10 +245,10 @@ do_poll(void) static void do_event(void) { - static process_event_t ev; - static process_data_t data; - static struct process *receiver; - static struct process *p; + process_event_t ev; + process_data_t data; + struct process *receiver; + struct process *p; /* * If there are any events in the queue, take the first one and walk @@ -321,7 +321,7 @@ process_nevents(void) int process_post(struct process *p, process_event_t ev, process_data_t data) { - static process_num_events_t snum; + process_num_events_t snum; if(PROCESS_CURRENT() == NULL) { PRINTF("process_post: NULL process posts event %d to process '%s', nevents %d\n",