void OSMutexDel (OS_MUTEX *p_mutex,
OS_OPT opt,
OS_ERR *p_err)
File | Called from | Code enabled by |
---|---|---|
| Task only |
|
...
Description
Deletes a mutex. This function should be used with care because multiple tasks may rely on the presence of the mutex. Generally speaking, before deleting a mutex, first delete all the tasks that access the mutex. However, as a general rule, do not delete kernel objects at run-time.
Files
os.h/os_mutex.c
Prototype
Arguments
p_mutex
is a pointer to the mutex to delete.
...
The number of tasks that were waiting for the mutex and 0 if an error occurred.
Required Configuration
OS_CFG_MUTEX_EN
and OS_CFG_MUTEX_DEL_EN
must be enabled in os_cfg.h. Refer to µC/OS-III Configuration Manual
Callers
Application.
Notes/Warnings
- Use this call with care as other tasks may expect the presence of the mutex.