ALIGN MACRO understanding
sdptroy3 at gmail.com
sdptroy3 at gmail.com
Thu Nov 7 00:34:19 EST 2013
While going through kernel source , I came across this ALIGN macro
#define ALIGN <http://lxr.free-electrons.com/ident?i=ALIGN>(x
<http://lxr.free-electrons.com/ident?i=x>, a
<http://lxr.free-electrons.com/ident?i=a>) __ALIGN_KERNEL
<http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL>((x
<http://lxr.free-electrons.com/ident?i=x>), (a
<http://lxr.free-electrons.com/ident?i=a>))
and
#define __ALIGN_KERNEL
<http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL>(x
<http://lxr.free-electrons.com/ident?i=x>, a
<http://lxr.free-electrons.com/ident?i=a>)
__ALIGN_KERNEL_MASK
<http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL_MASK>(x
<http://lxr.free-electrons.com/ident?i=x>, (typeof(x
<http://lxr.free-electrons.com/ident?i=x>))(a
<http://lxr.free-electrons.com/ident?i=a>) - 1)
#define __ALIGN_KERNEL_MASK
<http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL_MASK>(x
<http://lxr.free-electrons.com/ident?i=x>, mask
<http://lxr.free-electrons.com/ident?i=mask>) (((x
<http://lxr.free-electrons.com/ident?i=x>) + (mask
<http://lxr.free-electrons.com/ident?i=mask>)) & ~(mask
<http://lxr.free-electrons.com/ident?i=mask>))
What does this macro do? I have read this article
http://stackoverflow.com/questions/13122846/align-macro-kernel but it
was not of much help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131107/a324f63e/attachment.html
More information about the Kernelnewbies
mailing list