- 博客(3)
- 资源 (10)
- 收藏
- 关注
转载 Linux内核中使用红黑树的扩展特性实现区间树(Interval tree)
原文地址:http://galex.cn/linux%E5%86%85%E6%A0%B8%E4%B8%AD%E4%BD%BF%E7%94%A8%E7%BA%A2%E9%BB%91%E6%A0%91%E7%9A%84%E6%89%A9%E5%B1%95%E7%89%B9%E6%80%A7%E5%AE%9E%E7%8E%B0%E5%8C%BA%E9%97%B4%E6%A0%91%EF%BC%88int
2015-02-03 16:48:52 2024
原创 Linux内核中rbtree的使用
在结构体内嵌struct rb_node定义根节点struct rb_root把节点依据key加入红黑树移除节点遍历红黑树#include #include #include #define NODES 20struct test_node { u32 key; struct rb_node rb; u32 val;};static
2015-02-03 14:04:46 1287 1
原创 Linux内核中bitmap的使用
声明bitmap,实际上就是一个unsigned long数组bit计数从0开始#include #include #include #include #include #define BIT_CNT 50DECLARE_BITMAP(test_map, BIT_CNT) = {[0 ... BITS_TO_LONGS(BIT_CNT) - 1] = ~0};s
2015-02-02 10:44:06 2348
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人