Strict aliasing and chains revisited
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Oct 21 07:51:07 UTC 2010
On 10/21/2010 01:49 AM, Till Straumann wrote:
> I didn't think about this carefully but I guess a clean solution
> would be sacrificing the space for 1 pointer and make the
> Chain_Control a proper struct comprised of 2 Chain_Nodes.
The chain is a pivot data structure in RTEMS and some operations are not that
efficient if you sacrifice the node overlap. Also chain controls are used in
great numbers (one ready chain per task priority). We should keep that structure.
>
> A hacked solution would be making Chain_Control a (hopefully properly
> packed)
>
> union Chain_Control {
> struct {
> Chain_Node node;
> Chain_Node *fill;
> } head;
> struct {
> Chain_Node *fill;
> Chain_Node node;
> } tail;
> } Chain_Control;
Yes, this is an alternative to the casts. I have no preference here.
Till, what do you think about the change in watchdoginsert.c?
[...]
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list