![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tools
byd yes
这个作者很懒,什么都没留下…
展开
-
记录linux内核开立方函数
#include <stdio.h> #include <math.h> typedef unsigned long u64; typedef unsigned int u32; typedef unsigned char u8; #define __WORDSIZE 64 #define BITS_PER_LONG __WORDSIZE static __always_inline unsigned long __fls(unsigned long word) { in.原创 2021-08-02 14:35:50 · 713 阅读 · 0 评论 -
ffs函数
ffs()函数用于查找一个整数中的第一个置位值(也就是bit为1的位)。 函数原型: #include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char **argv) { printf("%d\n", ffs(atoi(argv[1]))); } 测试: ffs 1 1 ffs 2 2 ffs 3 1 ffs 8 4 ffs..原创 2021-07-16 09:19:54 · 1093 阅读 · 0 评论