Bugfix: PROCESS_PAUSE() must explicitly check the event type, otherwise we may cause the process event queue to fill up if we repeatedly call PROCESS_PAUSE() while other (broadcast) events are posted as well, such as timer events.

This commit is contained in:
Adam Dunkels 2011-11-22 09:36:27 +01:00
parent fb977cb9ef
commit 8edd86da5e
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ typedef unsigned char process_num_events_t;
*/
#define PROCESS_PAUSE() do { \
process_post(PROCESS_CURRENT(), PROCESS_EVENT_CONTINUE, NULL); \
PROCESS_WAIT_EVENT(); \
PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_CONTINUE); \
} while(0)
/** @} end of protothread functions */