lib/mutex: silent success on closing an uninit mutex
This commit is contained in:
parent
10afb077ff
commit
75fb37bf92
|
@ -168,6 +168,9 @@ int evl_close_mutex(struct evl_mutex *mutex)
|
|||
{
|
||||
int efd;
|
||||
|
||||
if (mutex->magic == __MUTEX_UNINIT_MAGIC)
|
||||
return 0;
|
||||
|
||||
if (mutex->magic != __MUTEX_ACTIVE_MAGIC)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue