CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | es_list_head |
Macros | |
#define | ES_LIST_HEAD_INIT(name) { &(name), &(name) } |
#define | ES_LIST_HEAD(name) struct es_list_head name = ES_LIST_HEAD_INIT(name) |
#define | ES_INIT_LIST_HEAD(ptr) |
#define | ES_LIST_FIRST(name) (name)->next |
#define | ES_LIST_LAST(name) (name)->prev |
#define | ES_LIST_ENTRY(ptr, type, member) ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) |
#define | ES_LIST_FOR_EACH(pos, head) for (pos = (head)->next; pos != (head); pos = pos->next) |
#define | ES_LIST_FOR_REVERSE_EACH(pos, head) for (pos = (head)->prev; pos != (head); pos = pos->prev) |
#define | ES_LIST_FOR_EACH_SAFE(pos, n, head) |
Typedefs | |
typedef struct es_list_head | es_list_head_t |
Functions | |
static void | __list_add (struct es_list_head *new_item, struct es_list_head *prev, struct es_list_head *next) |
static void | es_list_add (struct es_list_head *new_item, struct es_list_head *head) |
static void | es_list_add_tail (struct es_list_head *new_item, struct es_list_head *head) |
static void | __list_del (struct es_list_head *prev, struct es_list_head *next) |
static void | es_list_del (struct es_list_head *entry) |
static void | es_list_del_init (struct es_list_head *entry) |
static int | es_list_empty (struct es_list_head *head) |
static void | es_list_splice (struct es_list_head *list, struct es_list_head *head) |
#define ES_INIT_LIST_HEAD | ( | ptr | ) |
Definition at line 50 of file es_list.h.
Referenced by es_list_del_init().
#define ES_LIST_ENTRY | ( | ptr, | |
type, | |||
member | |||
) | ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) |
ES_LIST_ENTRY - get the struct for this entry : the &struct es_list_head pointer. : the type of the struct this is embedded in. : the name of the list_struct within the struct.
#define ES_LIST_FOR_EACH | ( | pos, | |
head | |||
) | for (pos = (head)->next; pos != (head); pos = pos->next) |
ES_LIST_FOR_EACH - iterate over a list : the &struct es_list_head to use as a loop counter. : the head for your list.
#define ES_LIST_FOR_EACH_SAFE | ( | pos, | |
n, | |||
head | |||
) |
LIST_FOR_EACH_SAFE - iterate over a list safe against removal of list entry : the &struct es_list_head to use as a loop counter.
: another &struct es_list_head to use as temporary storage : the head for your list.
#define ES_LIST_FOR_REVERSE_EACH | ( | pos, | |
head | |||
) | for (pos = (head)->prev; pos != (head); pos = pos->prev) |
LIST_FOR_REVERSE_EACH - iterate over a list with reverse order : the &struct es_list_head to use as a loop counter. : the head for your list.
#define ES_LIST_HEAD | ( | name | ) | struct es_list_head name = ES_LIST_HEAD_INIT(name) |
typedef struct es_list_head es_list_head_t |
|
inlinestatic |
Definition at line 63 of file es_list.h.
References es_list_head::next, and es_list_head::prev.
Referenced by es_list_add(), and es_list_add_tail().
|
inlinestatic |
Definition at line 104 of file es_list.h.
References es_list_head::next, and es_list_head::prev.
Referenced by es_list_del(), and es_list_del_init().
|
inlinestatic |
es_list_add - add a new entry : new entry to be added : list head to add it after
Insert a new entry after the specified head. This is good for implementing stacks.
Definition at line 79 of file es_list.h.
References __list_add(), and es_list_head::next.
|
inlinestatic |
es_list_add_tail - add a new entry : new entry to be added : list head to add it before
Insert a new entry before the specified head. This is useful for implementing queues.
Definition at line 92 of file es_list.h.
References __list_add(), and es_list_head::prev.
|
inlinestatic |
es_list_del - deletes entry from list. : the element to delete from the list. Note: es_list_empty on entry does not return true after this, the entry is in an undefined state.
Definition at line 115 of file es_list.h.
References __list_del(), es_list_head::next, and es_list_head::prev.
|
inlinestatic |
es_list_del_init - deletes entry from list and reinitialize it. : the element to delete from the list.
Definition at line 125 of file es_list.h.
References __list_del(), ES_INIT_LIST_HEAD, es_list_head::next, and es_list_head::prev.
|
inlinestatic |
es_list_empty - tests whether a list is empty : the list to test.
Definition at line 135 of file es_list.h.
References es_list_head::next.
|
inlinestatic |
LIST_SPLICE - join two lists : the new list to add. : the place to add it in the first list.
Definition at line 145 of file es_list.h.
References es_list_head::next, and es_list_head::prev.