Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Wake up tasks blocked on empty/full queue with error_status

Posted by ondrap-cze on January 7, 2016

Hi We are using FreeRTOS version 8.0.1 and our interest is about the blocked task on empty/full queue. We would like to have queue which can be closed. Function close will wake up all tasks blocked on empty/full queue with special error code (or exception) and all future requests for read or write to the queue will return this special error code (or exception). Same functionality is described in paper [1] on http://www.open-std.org/.

Is it possible to achieve this functionality with FreeRTOS queues or another synchronization primitives?

Our system uses tasks which receive shutdown signal and after received it terminates itself. But we started using queues for sending messages between tasks and this approach is not possible when task gets blocked on empty queue. Our primary concern is to implement proper shutdown procedure for every task.

Thanks, Ondrej

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3533.html#closed_queues


Wake up tasks blocked on empty/full queue with error_status

Posted by rtel on January 7, 2016

There is an outstanding feature request, which is scheduled to be implemented "soon" (?) to allow tasks that are in the Blocked state to wait for an event to abort their wait, and re-enter the Ready state. That may simplify your particular scenario, but other than that, there is no way to close a queue. Perhaps you could implement this using a wrapper around the queue functions, or possibly even using the trace macros (although you may find trace macros are only in place after a read/write to a queue has already passed or failed).


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists