Skip to content
Commit 53b81793 authored by James Harris's avatar James Harris Committed by Anas Nashif
Browse files

kernel: sem: handle resets with outstanding waiting threads



Previously, a k_sem_reset with any outstanding waiting threads would
result in the semaphore in an inconsistent state, with more threads
waiting in the wait_q than the count would indicate.

Explicitly -EAGAIN any waiting threads upon k_sem_reset, to
ensure safety here.

Signed-off-by: default avatarJames Harris <james.harris@intel.com>
parent 6fd147b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment