xTaskRemoveFromEventList usage

Im trying to implement a counting semaphore. typedef struct SemaphoreDefinition {     int     count;     xList    xTasksWaitingToTake; }xSEMAPHORE ; in my SemaphoreGive() , i need to extract highest priority task from xTasksWaitingToTake list does xTaskRemoveFromEventList(xTasksWaitingToTake) really remove highest priority task from my semaphore event list, remove it from delayed/overflow delayed list and put it in ready list? I just cant find an example of it in FreeRTOS itself. xQueueSend/Receive doesnt seem to be using this function.

xTaskRemoveFromEventList usage

xTaskRemoveFromEventList is used from queue.c.  The normal way to implement a counting semaphore is to use a queue in the same way that the binary semaphore does, but with more than one space on the queue.  No data is actually queued as the data size is set to zero.

xTaskRemoveFromEventList usage

yeah, but I am supposed to do some study of difference between semaphore with dedicated structure, and semaphore using queue structure like FreeRTOS’s. does FreeRTOS provide facility to extract highest priority task from event list?

xTaskRemoveFromEventList usage

This is done automatically within xTaskRemoveFromEventList.