OS_SEM_CTR OSSemPend (OS_SEM *p_sem,
OS_TICK timeout,
OS_OPT opt,
CPU_TS *p_ts,
OS_ERR *p_err)
File | Called from | Code enabled by |
---|---|---|
| Task only |
|
...
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.
...
The new value of the semaphore count.
Required Configuration
OS_CFG_SEM_EN
must be enabled in os_cfg.h. Refer to µC/OS-III Configuration Manual
Callers
Application.
Notes/Warnings
- Semaphores must be created before they are used.