linux内核中offsetof与container_of的宏定义 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) /** * container_of - cast a member of a structure out to the containing structure * @ptr: the pointer to the member. * @type: the type…
内置类型的最大值宏定义 本文地址: http://blog.csdn.net/caroline_wendy/article/details/24311895 C++中, 常常会使用, 某些类型的最大值, 如int的最大整数(INT_MAX), C的函数中, 包括了这些宏定义. 头文件: #include <climits> 详细參见: name expresses value* CHAR_BIT Number of bits in a char object (byte) 8 or great…