Macros like <ARRAYSIZE()> and <container_of()> adhere to syntax and definitions encountered in many systems and are only defined here if there is not a definition already in force.
|acncommon.h||Macros like <ARRAYSIZE()> and <container_of()> adhere to syntax and definitions encountered in many systems and are only defined here if there is not a definition already in force.|
|container_of(ptr, type, member)||Find the containing structure of a member.|
|ARRAYSIZE(array)||The number of elements in array.|
|STRINGIFY(s)||Turn the expansion of a macro into a string|
|ZEROTOEND(pstruct, member)||zero out a structure starting at member through to the end|
|nbits(x)||Number of bits required to contain an integer.|
|clog2(x)||log2 of integer x rounded up to nearest integer.|
|cpwr2(x)||Round up to nearest power of 2 larger than or equal to x This is the same as (1 << clog2(x))|
|Avoiding compiler warnings.|
Find the containing structure of a member.
This may already be defined in your programming environment. If not it is defined here.
Given a pointer to a member of a structure, this macro will return a pointer to the parent structure.
|ptr||pointer to to the member|
|ptype||the type of the parent structure|
|member||the name of the member|