list_head structure
来源:互联网 发布:iphone看图软件 编辑:程序博客网 时间:2024/06/05 03:28
A new list is created by using the LIST_HEAD(list_name) macro. It declares a new variable named list_name of type list_head, which is a dummy first element that acts as a placeholder for the head of the new list,and initializes the prev and next fields of the list_head data structure so as to point to the list_name variable itself; seeFigure 3-3 (b).
Table 3-1. List handling functions and macros
Name
Description
list_add(n,p)
Inserts an element pointed to by n right after the specified element pointed to by p. (To insert n at the beginning of the list, set p to the address of the list head.)
list_add_tail(n,p)
Inserts an element pointed to by n right before the specified element pointed to by p. (To insert n at the end of the list, set p to the address of the list head.)
list_del(p)
Deletes an element pointed to by p. (There is no need to specify the head of the list.)
list_empty(p)
Checks if the list specified by the address p of its head is empty.
list_entry(p,t,m)
Returns the address of the data structure of type t in which the list_head field that has the name m and the address p is included.
list_for_each(p,h)
Scans the elements of the list specified by the address h of the head; in each iteration, a pointer to the list_head structure of the list element is returned in p.
list_for_each_entry(p,h,m)
Similar to list_for_each, but returns the address of the data structure embedding the list_head structure rather than the address of the list_head structure itself.
- list_head structure
- list_head
- list_head
- list_head
- structure
- list_head实例
- 关于list_head
- list_head详解
- list_head 内核
- linux list_head
- list_head使用
- list_head解析
- list_head结构的介绍
- list_head使用介绍
- 详解内核list_head结构
- list_head结构的使用
- Linux的双链表list_head
- list_head使用介绍
- 多线程(三)
- 2011-08-31
- javascript 进度条
- ListView与RatingBar
- 2011-09-01
- list_head structure
- Unhandled exception at 0x00000000 in CallDll.exe: 0xC0000005: Access violation reading location 0x00
- 2011-09-02
- hdu 题目分类
- Android Dev Guide -> User Interface
- Linux下Oracle的基本操作
- C语言整型数据类型
- 2011-09-05
- Android编程 - WebView控件基本使用方法