|
| << Previous | Next >> |
INT16U OSSemAccept (OS_EVENT *pevent);
Description
- This function checks the semaphore to see if a resource is available or if an event occurred. Unlike
OSSemPend(),OSSemAccept()does not suspend the calling task if the resource is not available or the event did not occur.Parameters
- pevent
- Pointer to the desired semaphore's event control block
Return value
- Semaphore value:
If>0, semaphore value is decremented; value is returned before the decrement.
If0, then either resource is unavailable, event did not occur, orNULLor invalid pointer was passed to the function.Library
- OS_SEM.C
See also
- OSSemCreate, OSSemPend, OSSemPost, OSSemQuery
| 020-0059 Rev. D | << Previous | Next >> | µC/OS-II |