FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2013 Threads] xQueueSelectFromSet set orderPosted 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 orderPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|