InnoDB Plugin  1.0
Data Structures | Functions
ut0list.h File Reference
#include "mem0mem.h"
#include "ut0list.ic"
Include dependency graph for ut0list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ib_list_t
struct  ib_list_node_t
struct  ib_list_helper_t

Functions

UNIV_INTERN ib_list_tib_list_create (void)
UNIV_INTERN ib_list_tib_list_create_heap (mem_heap_t *heap)
UNIV_INTERN void ib_list_free (ib_list_t *list)
UNIV_INTERN ib_list_node_tib_list_add_first (ib_list_t *list, void *data, mem_heap_t *heap)
UNIV_INTERN ib_list_node_tib_list_add_last (ib_list_t *list, void *data, mem_heap_t *heap)
UNIV_INTERN ib_list_node_tib_list_add_after (ib_list_t *list, ib_list_node_t *prev_node, void *data, mem_heap_t *heap)
UNIV_INTERN void ib_list_remove (ib_list_t *list, ib_list_node_t *node)
UNIV_INLINE ib_list_node_tib_list_get_first (ib_list_t *list)
UNIV_INLINE ib_list_node_tib_list_get_last (ib_list_t *list)
UNIV_INLINE ibool ib_list_is_empty (const ib_list_t *list)

Detailed Description

A double-linked list

Created 4/26/2006 Osku Salerma

Function Documentation

UNIV_INTERN ib_list_node_t* ib_list_add_after ( ib_list_t list,
ib_list_node_t prev_node,
void *  data,
mem_heap_t heap 
)

Add the data after the indicated node.

Returns
new list node in: memory heap to use
Parameters
listin: list
prev_nodein: node preceding new node (can be NULL)
datain: data
UNIV_INTERN ib_list_node_t* ib_list_add_first ( ib_list_t list,
void *  data,
mem_heap_t heap 
)

Add the data to the start of the list.

Returns
new list node in: memory heap to use
Parameters
listin: list
datain: data
UNIV_INTERN ib_list_node_t* ib_list_add_last ( ib_list_t list,
void *  data,
mem_heap_t heap 
)

Add the data to the end of the list.

Returns
new list node in: memory heap to use
Parameters
listin: list
datain: data
UNIV_INTERN ib_list_t* ib_list_create ( void  )

Create a new list using mem_alloc. Lists created with this function must be freed with ib_list_free.

Returns
list
UNIV_INTERN ib_list_t* ib_list_create_heap ( mem_heap_t heap)

Create a new list using the given heap. ib_list_free MUST NOT BE CALLED for lists created with this function.

Returns
list in: memory heap to use
UNIV_INTERN void ib_list_free ( ib_list_t list)

Free a list. in: list

UNIV_INLINE ib_list_node_t* ib_list_get_first ( ib_list_t list)

Get the first node in the list.

Returns
first node, or NULL in: list

Get the first node in the list.

Returns
first node, or NULL
Parameters
listin: list
UNIV_INLINE ib_list_node_t* ib_list_get_last ( ib_list_t list)

Get the last node in the list.

Returns
last node, or NULL in: list

Get the last node in the list.

Returns
last node, or NULL
Parameters
listin: list
UNIV_INTERN void ib_list_remove ( ib_list_t list,
ib_list_node_t node 
)

Remove the node from the list. in: node to remove

Parameters
listin: list