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/
This commit is contained in:
Hardy 2016-04-13 18:12:47 +02:00
parent c9baf0cb57
commit b3f2bba3ec

View File

@ -245,10 +245,10 @@ do_poll(void)
static void static void
do_event(void) do_event(void)
{ {
static process_event_t ev; process_event_t ev;
static process_data_t data; process_data_t data;
static struct process *receiver; struct process *receiver;
static struct process *p; struct process *p;
/* /*
* If there are any events in the queue, take the first one and walk * If there are any events in the queue, take the first one and walk
@ -321,7 +321,7 @@ process_nevents(void)
int int
process_post(struct process *p, process_event_t ev, process_data_t data) 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) { if(PROCESS_CURRENT() == NULL) {
PRINTF("process_post: NULL process posts event %d to process '%s', nevents %d\n", PRINTF("process_post: NULL process posts event %d to process '%s', nevents %d\n",