portability: cmsis: Fix possible race in osEventFlagsWait()

In osEventFlagsWait(), if an event raises after the call to k_event_wait()
and before the call to k_event_clear(), we may clear it while it is not
going to be report to the caller.

Reported-by: Rahul Gurram <rahul.gurram@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
1 file changed