|
void | _CORE_semaphore_Initialize (CORE_semaphore_Control *the_semaphore, uint32_t initial_value) |
| Initialize the semaphore based on the parameters passed. More...
|
|
RTEMS_INLINE_ROUTINE void | _CORE_semaphore_Acquire_critical (CORE_semaphore_Control *the_semaphore, Thread_queue_Context *queue_context) |
|
RTEMS_INLINE_ROUTINE void | _CORE_semaphore_Release (CORE_semaphore_Control *the_semaphore, Thread_queue_Context *queue_context) |
|
RTEMS_INLINE_ROUTINE void | _CORE_semaphore_Destroy (CORE_semaphore_Control *the_semaphore, const Thread_queue_Operations *operations, Thread_queue_Context *queue_context) |
|
RTEMS_INLINE_ROUTINE Status_Control | _CORE_semaphore_Surrender (CORE_semaphore_Control *the_semaphore, const Thread_queue_Operations *operations, uint32_t maximum_count, Thread_queue_Context *queue_context) |
| Surrender a unit to a semaphore. More...
|
|
RTEMS_INLINE_ROUTINE uint32_t | _CORE_semaphore_Get_count (const CORE_semaphore_Control *the_semaphore) |
|
RTEMS_INLINE_ROUTINE Status_Control | _CORE_semaphore_Seize (CORE_semaphore_Control *the_semaphore, const Thread_queue_Operations *operations, Thread_Control *executing, bool wait, Thread_queue_Context *queue_context) |
|
This handler encapsulates functionality which provides the foundation Semaphore services used in all of the APIs supported by RTEMS.
◆ _CORE_semaphore_Get_count()
This routine returns the current count associated with the semaphore.
- Parameters
-
[in] | the_semaphore | is the semaphore to obtain the count of |
- Returns
- the current count of this semaphore
◆ _CORE_semaphore_Initialize()
Initialize the semaphore based on the parameters passed.
This package is the implementation of the CORE Semaphore Handler. This core object utilizes standard Dijkstra counting semaphores to provide synchronization and mutual exclusion capabilities.
This routine initializes the semaphore based on the parameters passed.
- Parameters
-
[in] | the_semaphore | is the semaphore to initialize |
[in] | initial_value | is the initial count of the semaphore |
◆ _CORE_semaphore_Seize()
This routine attempts to receive a unit from the_semaphore. If a unit is available or if the wait flag is false, then the routine returns. Otherwise, the calling task is blocked until a unit becomes available.
- Parameters
-
[in] | the_semaphore | is the semaphore to obtain |
[in] | operations | The thread queue operations. |
[in] | executing | The currently executing thread. |
[in] | wait | is true if the thread is willing to wait |
[in] | queue_context | is a temporary variable used to contain the ISR disable level cookie |
◆ _CORE_semaphore_Surrender()
Surrender a unit to a semaphore.
This routine frees a unit to the semaphore. If a task was blocked waiting for a unit from this semaphore, then that task will be readied and the unit given to that task. Otherwise, the unit will be returned to the semaphore.
- Parameters
-
[in] | the_semaphore | is the semaphore to surrender |
[in] | operations | The thread queue operations. |
[in] | queue_context | is a temporary variable used to contain the ISR disable level cookie |
- Return values
-
an | indication of whether the routine succeeded or failed |