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:
parent
fb977cb9ef
commit
8edd86da5e
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue