Skip to content

File es_list.h

FileList > cubrid > src > storage > es_list.h

Go to the source code of this file

Classes

Type Name
struct es_list_head

Public Types

Type Name
typedef struct es_list_head es_list_head_t

Public Static Functions

Type Name
void __list_add (struct es_list_head * new_item, struct es_list_head * prev, struct es_list_head * next)
void __list_del (struct es_list_head * prev, struct es_list_head * next)
void es_list_add (struct es_list_head * new_item, struct es_list_head * head)
void es_list_add_tail (struct es_list_head * new_item, struct es_list_head * head)
void es_list_del (struct es_list_head * entry)
void es_list_del_init (struct es_list_head * entry)
int es_list_empty (struct es_list_head * head)
void es_list_splice (struct es_list_head * list, struct es_list_head * head)

Macros

Type Name
define ES_INIT_LIST_HEAD (ptr) /* multi line expression */
define ES_LIST_ENTRY (ptr, type, member) ((type \*)(([**char**](broker__monitor_8c.md#function-timeout) \*)(ptr)-([**unsigned**](broker__monitor_8c.md#function-timeout) [**long**](broker__monitor_8c.md#function-timeout))(&((type \*)0)->[**member**](broker__monitor_8c.md#function-timeout))))
define ES_LIST_FIRST (name) (name)->next
define ES_LIST_FOR_EACH (pos, head) [**for**](dynamic__load_8c.md#function-for) (pos = (head)->next; pos != (head); pos = pos->next)
define ES_LIST_FOR_EACH_SAFE (pos, n, head) /* multi line expression */
define ES_LIST_FOR_REVERSE_EACH (pos, head) [**for**](dynamic__load_8c.md#function-for) (pos = (head)->prev; pos != (head); pos = pos->prev)
define ES_LIST_HEAD (name) [**struct**](broker__monitor_8c.md#function-timeout) [**es\_list\_head**](structes__list__head.md) name = [**ES\_LIST\_HEAD\_INIT**](es__list_8h.md#define-es_list_head_init)(name)
define ES_LIST_HEAD_INIT (name) { &(name), &(name) }
define ES_LIST_LAST (name) (name)->prev

Public Types Documentation

typedef es_list_head_t

typedef struct es_list_head es_list_head_t;

Public Static Functions Documentation

function __list_add

static inline void __list_add (
    struct  es_list_head * new_item,
    struct  es_list_head * prev,
    struct  es_list_head * next
) 

function __list_del

static inline void __list_del (
    struct  es_list_head * prev,
    struct  es_list_head * next
) 

function es_list_add

static inline void es_list_add (
    struct  es_list_head * new_item,
    struct  es_list_head * head
) 

es_list_add - add a new entry @new: new entry to be added @head: list head to add it after

Insert a new entry after the specified head. This is good for implementing stacks.


function es_list_add_tail

static inline void es_list_add_tail (
    struct  es_list_head * new_item,
    struct  es_list_head * head
) 

es_list_add_tail - add a new entry @new: new entry to be added @head: list head to add it before

Insert a new entry before the specified head. This is useful for implementing queues.


function es_list_del

static inline void es_list_del (
    struct  es_list_head * entry
) 

es_list_del - deletes entry from list. @entry: 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.


function es_list_del_init

static inline void es_list_del_init (
    struct  es_list_head * entry
) 

es_list_del_init - deletes entry from list and reinitialize it. @entry: the element to delete from the list.


function es_list_empty

static inline int es_list_empty (
    struct  es_list_head * head
) 

es_list_empty - tests whether a list is empty @head: the list to test.


function es_list_splice

static inline void es_list_splice (
    struct  es_list_head * list,
    struct  es_list_head * head
) 

LIST_SPLICE - join two lists @list: the new list to add. @head: the place to add it in the first list.


Macro Definition Documentation

define ES_INIT_LIST_HEAD

#define ES_INIT_LIST_HEAD (
    ptr
) `/* multi line expression */`

define ES_LIST_ENTRY

#define ES_LIST_ENTRY (
    ptr,
    type,
    member
) `((type *)(( char *)(ptr)-( unsigned  long )(&((type *)0)-> member )))`

ES_LIST_ENTRY - get the struct for this entry @ptr: the &struct es_list_head pointer. @type: the type of the struct this is embedded in. @member: the name of the list_struct within the struct.


define ES_LIST_FIRST

#define ES_LIST_FIRST (
    name
) `(name)->next`

define ES_LIST_FOR_EACH

#define ES_LIST_FOR_EACH (
    pos,
    head
) `for (pos = (head)->next; pos != (head); pos = pos->next)`

ES_LIST_FOR_EACH - iterate over a list @pos: the &struct es_list_head to use as a loop counter. @head: the head for your list.


define ES_LIST_FOR_EACH_SAFE

#define ES_LIST_FOR_EACH_SAFE (
    pos,
    n,
    head
) `/* multi line expression */`
LIST_FOR_EACH_SAFE - iterate over a list safe against removal of list entry @pos: the &struct es_list_head to use as a loop counter.
another &struct es_list_head to use as temporary storage @head: the head for your list.

define ES_LIST_FOR_REVERSE_EACH

#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 @pos: the &struct es_list_head to use as a loop counter. @head: the head for your list.


define ES_LIST_HEAD

#define ES_LIST_HEAD (
    name
) `struct  es_list_head name = ES_LIST_HEAD_INIT (name)`

define ES_LIST_HEAD_INIT

#define ES_LIST_HEAD_INIT (
    name
) `{ &(name), &(name) }`

define ES_LIST_LAST

#define ES_LIST_LAST (
    name
) `(name)->prev`


The documentation for this class was generated from the following file cubrid/src/storage/es_list.h