Linux内核数据结构hlist_head

hlist_head 和list_head在内核中常用于hashtable,分别表示表头和表头所在的双向链表中的某项。

两者的结构如下:

struct hlist_head {
  struct hlist_node *first;
};

struct hlist_node {
  struct hlist_node *next, **pprev;
};

其内存结构如下:

Hash table 为散列表数组,数组中保存着struct hlist_head.以hlist_head为链表表头的链表。

猜你喜欢

转载自www.cnblogs.com/bspp1314/p/9457013.html
今日推荐