commit | 53b817937127ef7b28ef5499ed5dd33a73f9978a | [log] [tgz] |
---|---|---|
author | James Harris <james.harris@intel.com> | Thu Mar 04 15:47:27 2021 -0800 |
committer | Anas Nashif <anas.nashif@intel.com> | Sat Mar 06 07:39:43 2021 -0500 |
tree | ed79b38ae14b46ab094300e307b4400263c307e6 | |
parent | 6fd147b6126456464cb0f864c2340a0e88a447fa [diff] |
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: James Harris <james.harris@intel.com>