MySQL 9.1.0
Source Code Documentation
ut0list.h File Reference

A double-linked list. More...

#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...
 
static ib_list_node_tib_list_get_first (ib_list_t *list)
 Get the first node in the list. More...
 
static ib_list_node_tib_list_get_last (ib_list_t *list)
 Get the last node in the list. More...
 
static bool 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
Parameters
listin: list
datain: data
heapin: memory heap to use

◆ 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

Parameters
listin: list

◆ ib_list_get_first()

static ib_list_node_t * ib_list_get_first ( ib_list_t list)
inlinestatic

Get the first node in the list.

Returns
first node, or NULL in: list

◆ ib_list_get_last()

static ib_list_node_t * ib_list_get_last ( ib_list_t list)
inlinestatic

Get the last node in the list.

Returns
last node, or NULL in: list

◆ ib_list_is_empty()

static bool ib_list_is_empty ( const ib_list_t list)
inlinestatic

◆ ib_list_remove()

void ib_list_remove ( ib_list_t list,
ib_list_node_t node 
)

Remove the node from the list.

Parameters
[in]listList
[in]nodeNode to remove