Page 1 of 1

Queue Implementation

Posted: Fri Aug 22, 2014 4:09 pm
by chrismerck
Is there an inter-thread queue implementation in ChibiOS which can hold objects of fixed size? Mailboxes only hold pointers to data. I want to store the actual data on the queue.

I could of course implement one, but I'd prefer to use some built-in functionality if possible.

Thanks.

Re: Queue Implementation

Posted: Fri Aug 22, 2014 6:28 pm
by Giovanni
Hi,

What you need is a pool of objects plus a mailbox. If you need an example checkout revision 4147, under /os/various you will find mail.c and mail.h. I haven't tested those much some some people reported it working.

I will look into adding this, or something similar, to 3.0 as a library module.

Giovanni