question

duanallen-5336 avatar image
1 Vote"
duanallen-5336 asked ·

About the limite of the message_size of queue

hi, I'm just curious why the kernel limits the message_size of queue to upper 16 32-bit word. What can I choose to do if the msg size is bigger than 16 32-bit word size?
It looks that simply disabling the size check code in _txe_queue_create dose not help.
Thanks in advance for your help.

azure-rtos
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @duanallen-5336 Thanks for contributing to this forum, If the below response is helpful, please click "Accept Answer" and upvote it So that it is useful to others as well.

0 Votes 0 ·

1 Answer

ScottLarson-6169 avatar image
1 Vote"
ScottLarson-6169 answered ·

Queues are designed to pass small messages or pointers to bigger messages. I suggest you pass a pointer.

· 6 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Scott, so this behaves like queue by reference. Can I assume that TX won't dynamicly apply memory inside any API and to let user to manage this instead?

0 Votes 0 ·

@duanallen-5336 correct - ThreadX does not dynamically allocate any memory. ThreadX always leaves that up to the user to manage.

0 Votes 0 ·
Anguel avatar image Anguel duanallen-5336 ·

Hi Scott,

I also read about this message limitation in ThreadX/Azure RTOS. It becomes a real problem if I need to pass some bigger packets through a queue. So I wonder if an advanced RTOS like this offers some straight-forward way to manage the actual messages that the queue points to or does this really have to be implemented manually? If it has to be done manually, are there any examples?

Thanks in advance,

Anguel

0 Votes 0 ·

Hi Anguel,

ThreadX does not offer any way to manage the messages the queue points to, and we do not have any examples of queuing longer messages.

0 Votes 0 ·
Show more comments