lkml.org 
[lkml]   [2022]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [for-next][PATCH 21/21] tracing: Use a struct alignof to determine trace event field alignment
On Mon, 1 Aug 2022 07:46:22 +0000
David Laight <David.Laight@ACULAB.COM> wrote:

> > Define a macro as:
> >
> > ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b)))
> >
> > which gives the actual alignment of types in a structure.
>
> The simpler:
> __alignof__(struct {type b;})
> also works.

I'll have to try that out.

For now, as the previous version made it through all my tests, I may be
pushing it, but change it to this for simplicity if that also works and
passes all my test.

Thanks,

-- Steve

\
 
 \ /
  Last update: 2022-08-01 23:08    [W:0.063 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site