kernel: mutex: add error checking
k_mutex_unlock will now perform error checking and return on failures.
If the current thread does not own the mutex, we will now return -EPERM.
In the unlikely situation where we own a lock and the lock count is
zero, we assert. This is considered an undefined bahviour and should not
happen.
Signed-off-by:
Anas Nashif <anas.nashif@intel.com>
Loading
Please sign in to comment