@CHIP-RTOS C Library - RTOS API
Attempt to access a semaphore, without waiting.
int RTX_Get_Sem ( int semID );
- The semaphore ID of a counting or resource
acquired by a call to RTX_Create_Sem.
- 0 on success (semaphore granted) else
- This call returns with an error if the semaphore is not available.
For counting semaphores, available means that the semaphore's count
was non-zero. For resource semaphores, available means that
the semaphore "in use" count was either zero or the calling task
is the current owner.
This API will decrement an available counting semaphore's
count value. For resource semaphores, it will increment the
"in use" count if the semaphore was available.
On RTOS versions prior to
SC1x version 1.27 and SC1x3/SC2x version 1.41, this function was
restricted to counting semaphores. This restriction has been
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
for more details.
- RTX API Overview
Supported since or modified in @CHIP-RTOS version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document