MySQL  8.0.19
Source Code Documentation
ut0list.h File Reference
#include "mem0mem.h"
#include "ut0list.ic"

Go to the source code of this file.

Classes

struct  ib_list_t
 
struct  ib_list_node_t
 
struct  ib_list_helper_t
 

Functions

ib_list_tib_list_create (void)
 Create a new list using mem_alloc. More...
 
void ib_list_free (ib_list_t *list)
 Free a list. More...
 
ib_list_node_tib_list_add_last (ib_list_t *list, void *data, mem_heap_t *heap)
 Add the data to the end of the list. More...
 
void ib_list_remove (ib_list_t *list, ib_list_node_t *node)
 Remove the node from the list. More...
 
UNIV_INLINE ib_list_node_tib_list_get_first (ib_list_t *list)
 Get the first node in the list. More...
 
UNIV_INLINE ib_list_node_tib_list_get_last (ib_list_t *list)
 Get the last node in the list. More...
 
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

◆ ib_list_add_last()

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
new list node

◆ ib_list_create()

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

Create a new list using mem_alloc.

Returns
list

◆ ib_list_free()

void ib_list_free ( ib_list_t list)

Free a list.

in: list

◆ ib_list_get_first()

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

◆ ib_list_get_last()

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

◆ ib_list_is_empty()

UNIV_INLINE ibool ib_list_is_empty ( const ib_list_t list)

◆ ib_list_remove()

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