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

xQueueSelectFromSet set order

Posted by https://www.google.com/accounts on February 27, 2013
In which order are returned queues or semaphores if e.g. both binary semaphores were given?

I mean a use case on ARM CM3. During ISR0 a binary semaphore A is given . Meanwhile a different interrupt with the same priority occurs, it is pended waiting for the end of the ISR0. The ISR1 gives a semaphore B.

Both semaphores (A and B) belongs to a queue set C and were added in this order xQueueAddToSet(A), xQueueAddToSet(B).

If I call xQueueSelectFromSet(C) before ISR0, will be the semaphore A returned? And if I call xQueueSelectFromSet(C) again, will be the semaphore B returned immediately?

Thank you for explanation.

Martin Velek


RE: xQueueSelectFromSet set order

Posted by Richard on February 27, 2013
The order in which queues are added to a queue set is not important. The queue set reports events in the order in which the events are received. Therefore if semaphore A and semaphore B are in the same set, and semaphore A is given before semaphore B, then the queue set returns the handle of semaphore A first whatever. Likewise if semaphore B is given before semaphore A then the queue set will return the handle of semaphore B whatever.

Hope this helps.

Regards.


[ 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