Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
void  OSMutexDel (OS_MUTEX  *p_mutex,
                  OS_OPT     opt,
                  OS_ERR    *p_err)

File

Called from

Code enabled by

os_mutex.c

Task only

OS_CFG_MUTEX_EN and OS_CFG_MUTEX_DEL_EN

...

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

  1. Use this call with care as other tasks may expect the presence of the mutex.

Example