<div dir="ltr">While going through kernel source , I came across this ALIGN macro<div><br></div><div><pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto;font-weight:bold">
#define <a href="http://lxr.free-electrons.com/ident?i=ALIGN" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">ALIGN</a>(<a href="http://lxr.free-electrons.com/ident?i=x" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a>, <a href="http://lxr.free-electrons.com/ident?i=a" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">a</a>)             <a href="http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">__ALIGN_KERNEL</a>((<a href="http://lxr.free-electrons.com/ident?i=x" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a>), (<a href="http://lxr.free-electrons.com/ident?i=a" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">a</a>))</pre>
<pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto">and</pre><pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto">
<span style="font-weight:bold">#define </span><a href="http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">__ALIGN_KERNEL</a><span style="font-weight:bold">(</span><a href="http://lxr.free-electrons.com/ident?i=x" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a><span style="font-weight:bold">, </span><a href="http://lxr.free-electrons.com/ident?i=a" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">a</a><span style="font-weight:bold">)            </span><a href="http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL_MASK" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">__ALIGN_KERNEL_MASK</a><span style="font-weight:bold">(</span><a href="http://lxr.free-electrons.com/ident?i=x" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a><span style="font-weight:bold">, (typeof(</span><a href="http://lxr.free-electrons.com/ident?i=x" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a><span style="font-weight:bold">))(</span><a href="http://lxr.free-electrons.com/ident?i=a" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">a</a><span style="font-weight:bold">) - 1)</span></pre>
<pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto"><span style="font-weight:bold">#define </span><a href="http://lxr.free-electrons.com/ident?i=__ALIGN_KERNEL_MASK" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">__ALIGN_KERNEL_MASK</a><span style="font-weight:bold">(</span><a href="http://lxr.free-electrons.com/ident?i=x" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a><span style="font-weight:bold">, </span><a href="http://lxr.free-electrons.com/ident?i=mask" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">mask</a><span style="font-weight:bold">)    (((</span><a href="http://lxr.free-electrons.com/ident?i=x" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">x</a><span style="font-weight:bold">) + (</span><a href="http://lxr.free-electrons.com/ident?i=mask" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">mask</a><span style="font-weight:bold">)) &amp; ~(</span><a href="http://lxr.free-electrons.com/ident?i=mask" style="font-weight:bold;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:black">mask</a><span style="font-weight:bold">))</span></pre>
<pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto"><span style="font-weight:bold"><br></span></pre><pre style="font-family:Monaco,&#39;Courier New&#39;,Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto">
What does this macro do? I have read this article  <a href="http://stackoverflow.com/questions/13122846/align-macro-kernel" style="font-family:arial;font-size:small">http://stackoverflow.com/questions/13122846/align-macro-kernel</a> but it was not of much help.</pre>
</div></div>