Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

xTaskRemoveFromEventList usage

Posted by Nobody/Anonymous on February 1, 2007
Im trying to implement a counting semaphore.

typedef struct SemaphoreDefinition {
int count;
xListxTasksWaitingToTake;
}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.

RE: xTaskRemoveFromEventList usage

Posted by embeddedc on February 1, 2007
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.

RE: xTaskRemoveFromEventList usage

Posted by Nobody/Anonymous on February 1, 2007
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?

RE: xTaskRemoveFromEventList usage

Posted by embeddedc on February 1, 2007
This is done automatically within xTaskRemoveFromEventList.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Careers

FreeRTOS and other embedded software careers at AWS.


Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner