mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-15 00:29:02 +00:00
Process only one poll request at a time to avoid starvation if one process keeps calling process_poll() from its poll handler
This commit is contained in:
parent
1b024d6e69
commit
f93a48599e
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: process.c,v 1.7 2008/01/23 21:06:25 adamdunkels Exp $
|
||||
* @(#)$Id: process.c,v 1.8 2008/01/24 21:00:51 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -234,7 +234,6 @@ do_poll(void)
|
||||
{
|
||||
struct process *p;
|
||||
|
||||
do {
|
||||
poll_requested = 0;
|
||||
/* Call the processes that needs to be polled. */
|
||||
for(p = process_list; p != NULL; p = p->next) {
|
||||
@ -244,7 +243,6 @@ do_poll(void)
|
||||
call_process(p, PROCESS_EVENT_POLL, NULL);
|
||||
}
|
||||
}
|
||||
} while(poll_requested);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user