Chinaunix首页 | 论坛 | 博客
  • 博客访问: 942422
  • 博文数量: 173
  • 博客积分: 3436
  • 博客等级: 中校
  • 技术积分: 1886
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-07 09:29
文章分类

全部博文(173)

文章存档

2016年(6)

2015年(10)

2014年(14)

2013年(8)

2012年(36)

2011年(63)

2010年(19)

2009年(17)

分类: BSD

2012-02-15 09:39:31

1.struct device 
    在sys/types.h 中有: typedef struct device *device_t;
    但结构体struct device 是在:kern/subr_bus.c中定义,我参照其实现重新定义数据结构可否?

C语言的基础知识:
在一个C语言文件中(bus.c)定义的结构体struct device,在某个.h文件中用typedef struct device *device_t 在其他文件中声明了该定义,如果再其它C文件中用的话,只能把相应的变量当成一个void的指针使用。


2. usb_handle_request.c 中包含了usb_if.h,但在BSD内核源码中,该文件并不存在。
   usb_if.h: This file is produced automatically. 
             Created from source file: ./usb/usb_if.m with "makeobjops.awk"
 
阅读(704) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~