Add chFifoObjectInitAligned Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
jsiekm
Posts: 1
Joined: Mon Jul 16, 2018 5:36 pm
Been thanked: 1 time

Add chFifoObjectInitAligned  Topic is solved

Postby jsiekm » Mon Jul 16, 2018 5:47 pm

Hello,

I have recently begun using ChibiOS and have noticed something that I believe may be a design inconsistency. Guarded and unguarded memory pools both provide a chXyzObjectInit and chXyzObjectInitAligned function so that the user can specify their own memory alignment if necessary. However, chFifo provides only chFifoObjectInit, which requires a memory alignment despite a function name that (if consistent with memory pools) implies the internal use of PORT_NATURAL_ALIGN when this is not the case.

I suggest changing the existing function to chFifoObjectInitAligned, and writing another chFifoObjectInit that uses PORT_NATURAL_ALIGN to call chFifoObjectInitAligned.

Please let me know if I have misunderstood something (and thanks for your time).

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: Add chFifoObjectInitAligned

Postby faisal » Sat Aug 11, 2018 2:21 am

Bump, any comments on this Giovanni?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Add chFifoObjectInitAligned

Postby Giovanni » Sat Aug 11, 2018 6:37 am

Hi,

It is feasible and in queue. It is just about adding another static inline function.

it requires an API change so it will go in next major release.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Add chFifoObjectInitAligned

Postby Giovanni » Sun Jan 06, 2019 10:38 am

Change implemented, among other improvements.

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 16 guests