FreeRTOS Support Archive

The FreeRTOS support forum can be used for active support both from Amazon Web Services
and the community. In return for using our software for
free, we request you play fair and do your bit to help others! 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.

queue priority

Allowing permission to write to a queue with no interruptions (writing packets) and a first come first served policy (no matter the task priority)
While waiting for the permission the task should be blocked

What do you think?

Thanks & Best Regards
Ran

queue priority

I'm afraid I don't understand your requirements. Are you talking about FreeRTOS queues? So writing to the queue using xQueueSend()? If so then any task can write to the queue, but only the highest priority task will be running, so the highest priority task will always write first. Assuming you are writing to the back of the queue (xQueueSend() or xQueueSendToBack()) then the queue will act as a FIFO. Data will come out in the same order it went in. As far as ready from the queue - if more than one task is attempting to read from the queue it is always the highest priority task that will read first.

queue priority

The queue handles all mutual exclusion issues for you - you do not need
to worry about more than one task trying to access the queue at the same
time. As far as which task will actually write to the queue - that is
handled by the priority of the task. The scheduler will always run the
highest priority task that is able to run - if that task is writing to a
queue then the write will effectively be atomic - that is - it can't be
interrupted by another task writing to the same queue.

queue priority

Queue is wrriten packets so i am guessing the mutual exclusion won't work. I guess i will use a binary semaphore to restrict access and forgo the "first come first served" requirement and leave it to the task priority

Best Regards,
Ran

queue priority

Mutual exclusion will always work for a single queue write. Are you wanting mutual exclusion across more than one write, so you want a task to write to the queue say 5 times without another task writing? Can you post a code snippet so we can understand better what you want to do.