📄 tqueue.h.txt
字号:
any mistakes,send email to netxiong@263.net
相关文件
/kernel/timer.c
/kernel/softirq.c
***********************************基本数据结构**************************************
struct tq_struct {
struct list_head list; /* linked list of active bh's */
unsigned long sync; /* must be initialized to zero */
void (*routine)(void *); /* function to call */
void *data; /* argument to function */
};
typedef struct list_head task_queue;
extern task_queue tq_timer, tq_immediate, tq_disk;
这是三个联系紧密的结构,有三个list_head型的机构,他们只提供所对应的bottom half的头节点。而他们之后的链表元素的结构是tq_struct型的。
例如下面的tq_timer:
tq_timer
prev
next------->tq_struct
routine
list------->tq_struct
routine
list
*************************************************************************************
***********************************处理函数*******************************************
(1):static inline int queue_task(struct tq_struct *bh_pointer, task_queue *bh_list)
#将一个tq_struct结构加入到指定的三中处理队列中的一种中。
#list_add_tail(&bh_pointer->list, bh_list);
| ^
| |
-----------------------
(2):static inline void run_task_queue(task_queue *list)
#运行list锁指定的一个处理队列。
#调用 __run_task_queue(list)。
**************************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -