![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux drive
文章平均质量分 77
a514223963
这个作者很懒,什么都没留下…
展开
-
linux kmalloc函数
2.6内核下 kmalloc的实现中有个__you_cannot_kmalloc_that_much函数,插入这个函数的目的是作参数检查. static inline void *kmalloc(size_t size, int flags) { if (__builtin_constant_p(size)) { int i = 0;原创 2012-05-28 17:11:20 · 5707 阅读 · 0 评论 -
cdev结构来描述
在Linux2.6内核中一个字符设备用cdev结构来描述,其定义如下: struct cdev { struct kobject kobj; struct module *owner; //所属模块 const struct file_operations *ops; //文件操作结构,在写驱动时,其转载 2012-06-05 16:05:51 · 496 阅读 · 0 评论