mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 18:18:32 -04:00
Add functions to get the buffers of statically created objects (#641)
Added various ...GetStaticBuffer() functions to get the buffers of statically created objects. --------- Co-authored-by: Paul Bartell <pbartell@amazon.com> Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
d4d5e43292
commit
9488ba22d8
13 changed files with 400 additions and 0 deletions
|
@ -1190,4 +1190,25 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||
*/
|
||||
#define uxSemaphoreGetCountFromISR( xSemaphore ) uxQueueMessagesWaitingFromISR( ( QueueHandle_t ) ( xSemaphore ) )
|
||||
|
||||
/**
|
||||
* semphr.h
|
||||
* @code{c}
|
||||
* BaseType_t xSemaphoreGetStaticBuffer( SemaphoreHandle_t xSemaphore );
|
||||
* @endcode
|
||||
*
|
||||
* Retrieve pointer to a statically created binary semaphore, counting semaphore,
|
||||
* or mutex semaphore's data structure buffer. This is the same buffer that is
|
||||
* supplied at the time of creation.
|
||||
*
|
||||
* @param xSemaphore The semaphore for which to retrieve the buffer.
|
||||
*
|
||||
* @param ppxSemaphoreBuffer Used to return a pointer to the semaphore's
|
||||
* data structure buffer.
|
||||
*
|
||||
* @return pdTRUE if buffer was retrieved, pdFALSE otherwise.
|
||||
*/
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
#define xSemaphoreGetStaticBuffer( xSemaphore, ppxSemaphoreBuffer ) xQueueGenericGetStaticBuffers( ( QueueHandle_t ) ( xSemaphore ), NULL, ( ppxSemaphoreBuffer ) )
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
||||
#endif /* SEMAPHORE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue