IO Queue question?
Posted: Thu Jan 15, 2015 11:12 am
Hello.
I'm using ChibiOS 2.6.6. on STM32F4.
Is there a reason to restrict the block access to IO queues from both directions? As I see, Input queues are block accessible from the output only. And the opposite - output queues are block accessible from the input only. I understand that such a implementation fits perfectly on low level drivers like UART, where the low side is byte sized. But there is a cases when the low side also has a block of bytes structure. In this case it will be good if we have block access from both side of queue. Typically such a need exist when two thread are connected on both sides of queue. Of course the block R/W operations needs to be atomic (protected) but it's not an usual case.
Did I miss something, or these is a special reason to restrict block access from both sides of queues?
I'm using ChibiOS 2.6.6. on STM32F4.
Is there a reason to restrict the block access to IO queues from both directions? As I see, Input queues are block accessible from the output only. And the opposite - output queues are block accessible from the input only. I understand that such a implementation fits perfectly on low level drivers like UART, where the low side is byte sized. But there is a cases when the low side also has a block of bytes structure. In this case it will be good if we have block access from both side of queue. Typically such a need exist when two thread are connected on both sides of queue. Of course the block R/W operations needs to be atomic (protected) but it's not an usual case.
Did I miss something, or these is a special reason to restrict block access from both sides of queues?