內核鏈表:雙向循環鏈表
鏈表初始化
INIT_LIST_HEAD
鏈表添加節點(頭插,尾插)
list_add
list_add_tail
鏈表的遍歷(前遍歷,後遍歷,安全遍歷)
list_for_each
list_for_each_safe
list_for_each_entry
list_for_each_entry_safe //一般在刪除節點時會用到
list_for_each_entry_reverse
list_for_each_entry_safe_reverse
鏈表刪除節點()
list_del
list_del_init
鏈表替換
list_replace
list_replace_init
鏈表移動(先刪除,然後頭插或尾插入到別的節點)
list_move
list_move_tail
判斷鏈表爲空
list_empty
判斷鏈表是否爲最後一個
list_is_last
參考連接 : https://www.cnblogs.com/yangguang-it/p/11667772.html