cmsis_rots_v1: fix for clearing signal flags in osSignalWait.

we use flag 0 in osSignalWait function to wait for
any single signal flag, but with this 0 flag,
it won't clear thread signal results as expected,
we need to check whether signal flag is 0 firstly.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
This commit is contained in:
Chen Peng1 2021-08-06 16:11:15 +08:00 committed by Christopher Friedt
parent 907b5d9e7f
commit 34d2ca613f

View file

@ -157,7 +157,7 @@ osEvent osSignalWait(int32_t signals, uint32_t millisec)
/* Clear signal flags as the thread is ready now */
key = irq_lock();
thread_def->signal_results &= ~(signals);
thread_def->signal_results &= signals ? ~(signals) : 0;
irq_unlock(key);
return evt;