|
| << Previous | Next >> |
OS_EVENT *OSMutexDel (OS_EVENT *pevent, INT8U opt, INT8U *err);
Description
- This function deletes a mutual exclusion semaphore and readies all tasks pending on it. Note that:
- This function must be used with care. Tasks that would normally expect the presence of the mutex MUST check the return code of
OSMutexPend().- This call can potentially disable interrupts for a long time. The interrupt disable time is directly proportional to the number of tasks waiting on the mutex.
- Because ALL tasks pending on the mutex will be readied, you MUST be careful because the resource(s) will no longer be guarded by the mutex.
Parameters
- pevent
- Pointer to mutex's event control block.
- opt
- May be one of the following delete options:
- err
- Pointer to an error code that can contain one of the following values:
OS_NO_ERR- The call was successful and the mutex was deletedOS_ERR_DEL_ISR- Attempted to delete the mutex from an ISROS_ERR_INVALID_OPT- An invalid option was specifiedOS_ERR_TASK_WAITING- One or more tasks were waiting on the mutexOS_ERR_EVENT_TYPE- If you didn't pass a pointer to a mutex pointer.Return value
- pevent
- On error.
- (OS_EVENT *)0
- Mutex was deleted.
Library
- OS_MUTEX.C
| 020-0059 Rev. D | << Previous | Next >> | µC/OS-II |