标题: 运行队列 优先级数组 数组大小是100还是140 [打印本页] 作者: 1w2b3l 时间: 2013-09-12 20:15 标题: 运行队列 优先级数组 数组大小是100还是140 2.6.24 版本的内核 kernel/sched.c (3.11也是):
/*
* This is the priority-queue data structure of the RT scheduling class:
*/
struct rt_prio_array {
DECLARE_BITMAP(bitmap, MAX_RT_PRIO+1); /* include 1 bit for delimiter */
struct list_head queue[MAX_RT_PRIO];
};
其中 MAX_RT_PRIO = 100;
《linux 内核编程》 P80 : (我没找到这本书是针对哪个内核版本的,是不是有些早了? 2011年出版的)
struct prio_array {
int nr_active;
unsigned long bitmap[BITMAP_SIZE]; /* include 1 bit for delimiter */
struct list_head queue[MAX_PRIO];
};