...
is a pointer to a variable that holds an error code:
OS_ERR_NONE
if If no tasks are waiting on the semaphore. In this case, the return value is also 0.
OS_ERR_OBJ_PTR_NULL
if If OS_CFG_ARG_CHK_EN
is set to 1
in os_cfg.h
: if p_sem
is a NULL
pointer.
OS_ERR_OBJ_TYPE
if If OS_CFG_OBJ_TYPE_CHK_EN
is set to 1
in os_cfg.h
: if p_sem
is not pointing to a semaphore.
OS_ERR_SEM_OVF
if If the post would have caused the semaphore counter to overflow.
...