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.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



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

Renesas

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