Description
Used when a task wants exclusive access to a resource, needs to synchronize its activities with an ISR or task, or is waiting until an event occurs.
...
OSSemPend()
also returns if the pend is aborted or, the semaphore is deleted.
Files
os.h/os_sem.c
Prototype
Arguments
p_sem
is a pointer to the semaphore.
...
If the semaphore is not signaled within the specified timeout.
Returned Value
The new value of the semaphore count.
Required Configuration
OS_CFG_SEM_EN
must be enabled in os_cfg.h. Refer to uC-OS-III Configuration Manual
Callers
Application.
Notes/Warnings
- Semaphores must be created before they are used.