Chinaunix首页 | 论坛 | 博客
  • 博客访问: 939046
  • 博文数量: 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-24 16:16:57

问题:
1 struct usb_bus中结构usb_bus_msg的变量为什么总是双份的?
  1. /*
  2.  * The following structure defines an USB BUS. There is one USB BUS
  3.  * for every Host or Device controller.
  4.  */
  5. struct usb_bus {
  6.   struct usb_bus_msg explore_msg[2];
  7.  struct usb_bus_msg detach_msg[2];
  8.  struct usb_bus_msg attach_msg[2];

2 要查看线程,需要获取进程ID。

cmd: ps waux; // show all the procs in the systme;

procstat -t PID //线程proc PID下的所有线程ID。

3:

对应一个host会新建4个线程+1次调用usb_proc_msignalusb_proc_msignal内调用cv_signal(&up->up_cv),然后可以唤醒四个线程。

 

阅读(1319) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~