ALIGN MACRO understanding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While going through kernel source , I came across this ALIGN macro

#define ALIGN(x, a)             __ALIGN_KERNEL((x), (a))
and
#define __ALIGN_KERNEL(x, a)            __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
#define __ALIGN_KERNEL_MASK(x, mask)    (((x) + (mask)) & ~(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.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux