HelloI am new to ESP32 and freeRTOS.
I use queues to sync two tasks. For that i use a sending and receving queues with
exactly one item. item can be anything eg: struct, integer, bool etc.
my synced task flow is like this.
task1
do something
send queue1
task1wait for queue2
task2
wait for queue1
receive queue1
do something
send queue2
task1
receve queue2
continue task1
Please assume that there is no deadlock scenario .
Tasks seems to be work fine.
But my problem is, In every free RTOS queue example i saw, queues were defined with more than one item.
Eventhough only one item is required still they used 2 or 3 items in a queue.
Why there is more than one item.
Are there any pitfalls of using one quque item.
Thank you;
Using Queues with one item
-
- Posts: 13
- Joined: Thu Jul 30, 2020 2:40 pm
Re: Using Queues with one item
Can anyone please answer this
Thank you
Thank you
Re: Using Queues with one item
That's fine, there's even https://www.freertos.org/xQueueOverwrite.html which is intended for single item queues.
-
- Posts: 13
- Joined: Thu Jul 30, 2020 2:40 pm
Re: Using Queues with one item
That helps. Thank you
Who is online
Users browsing this forum: No registered users and 107 guests