FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2015 Threads] Querying the count value of a counting semaphorePosted by jim-frenzel on October 27, 2015 I am running FreeRTOS version 8.2.2 and am wondering why there is no function provided to get the count value of a counting semaphore. While I did find a workaround - cast the handle as a queue handle and use uxQueueMessages Waiting() - it seems like having a dedicated function would be worthwhile. Any thoughts?
Querying the count value of a counting semaphorePosted by rtel on October 27, 2015 Any of the queue functions can be used on semahores too. I can add a "get current count" macro that calls the queue function.
Regards.
Querying the count value of a counting semaphorePosted by jim-frenzel on October 27, 2015 I think that would be great - particularly if it found its way into the documentation. :-)
Querying the count value of a counting semaphorePosted by rtel on October 28, 2015 I have added the line:
define xSemaphoreGetCount( xSemaphore ) uxQueueMessagesWaiting( (
QueueHandle_t ) ( xSemaphore ) )
but not checked it in yet. It will get checked in after it has been tested.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|