最近看代码看到这样的宏定义:
*#define read_48(struc, entry) (le32_to_cpu((struc)->entry##1) |\*
* ((chunk_t)le16_to_cpu((struc)->entry##2) << 31 << 1))*
*
*
*其中,struc 为struct ,定义如下*
*
*
*
struct multisnap_commit_block {
......
__u32 alloc_rover1; /* the next place where to try allocation */
__u16 alloc_rover2;
*
*
......
}
所以读这个变量,为alloc_rover = read_48(cb, alloc_rover);
以前没见过,网上也没搜到相关的资料,求解..........
*
_______________________________________________
Linux 内核开发中文邮件列表
Linux-...@zh-kernel.org
http://zh-kernel.org/mailman/listinfo/linux-kernel
Linux 内核开发中文社区: http://zh-kernel.org
~% gcc -E -xc -
#define read_48(struc, entry) (le32_to_cpu((struc)->entry##1) |\
((chunk_t)le16_to_cpu((struc)->entry##2) << 31 << 1))
alloc_rover = read_48(cb, alloc_rover);
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
alloc_rover = (le32_to_cpu((cb)->alloc_rover1) |((chunk_t)le16_to_cpu((cb)->alloc_rover2) << 31 << 1));
2011/3/3 liuchang <liuc...@nrchpc.ac.cn>
大家好,我是一个新手,想学习linux驱动相关的内容,请问谁能推荐基本这方面经典书籍,谢谢!!!