![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
内核代码分析
ErhuSCUT
这个作者很懒,什么都没留下…
展开
-
static __always_inline unsigned long __ffs(unsigned long word)
D:\SourceCode\linux-2.6.32-220.el6\include\asm-generic\bitops\__ffs.h /** * __ffs - find first bit in word.,返回word中第一个置位的位的位数(包括0)。例如:0x1,r=0;0x2,r=1;0x3,r=0;0x4,r=2..... * @word: The word to sea原创 2015-01-14 21:50:35 · 778 阅读 · 0 评论 -
驱动开发中ioctl cmd定义分析
参考RedHat内核,文件:include/asm-generic/ioctl.h,定义如下: 82 /* used to create numbers */ 83 #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 84 #define _IOR(type,nr,size) _IOC(_IOC_READ,(type原创 2017-07-13 22:22:50 · 1455 阅读 · 0 评论