MySQL 8.0.40
Source Code Documentation
ut0list.cc File Reference

A double-linked list. More...

#include "ut0list.h"
#include <stddef.h>

Functions

ib_list_tib_list_create (void)
 Create a new list. More...
 
void ib_list_free (ib_list_t *list)
 Free a list. More...
 
static ib_list_node_tib_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. 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...
 

Detailed Description

A double-linked list.

Created 4/26/2006 Osku Salerma

Function Documentation

◆ ib_list_add_after()

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

Add the data after the indicated node.

Returns
new list node
Parameters
listin: list
prev_nodein: node preceding new node (can be NULL)
datain: data
heapin: memory heap to use

◆ 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
Parameters
listin: list
datain: data
heapin: memory heap to use

◆ ib_list_create()

ib_list_t * ib_list_create ( void  )

Create a new 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_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