#include "mem0mem.h"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.
Classes | |
| struct | ib_list_struct |
| struct | ib_list_node_struct |
| struct | ib_list_helper_struct |
Typedefs | |
| typedef ib_list_struct | ib_list_t |
| typedef ib_list_node_struct | ib_list_node_t |
| typedef ib_list_helper_struct | ib_list_helper_t |
Functions | |
| ib_list_t * | ib_list_create (void) |
| ib_list_t * | ib_list_create_heap (mem_heap_t *heap) |
| void | ib_list_free (ib_list_t *list) |
| ib_list_node_t * | ib_list_add_first (ib_list_t *list, void *data, mem_heap_t *heap) |
| ib_list_node_t * | ib_list_add_last (ib_list_t *list, void *data, mem_heap_t *heap) |
| ib_list_node_t * | ib_list_add_after (ib_list_t *list, ib_list_node_t *prev_node, void *data, mem_heap_t *heap) |
| void | ib_list_remove (ib_list_t *list, ib_list_node_t *node) |
| UNIV_INLINE ib_list_node_t * | ib_list_get_first (ib_list_t *list) |
| UNIV_INLINE ib_list_node_t * | ib_list_get_last (ib_list_t *list) |
| typedef struct ib_list_helper_struct ib_list_helper_t |
| typedef struct ib_list_node_struct ib_list_node_t |
| typedef struct ib_list_struct ib_list_t |
| ib_list_node_t* ib_list_add_after | ( | ib_list_t * | list, | |
| ib_list_node_t * | prev_node, | |||
| void * | data, | |||
| mem_heap_t * | heap | |||
| ) |
Definition at line 91 of file ut0list.c.
References ib_list_node_struct::data, list(), mem_heap_alloc(), ib_list_node_struct::next, NULL, ib_list_node_struct::prev, and ut_a.
Referenced by ib_list_add_first(), and ib_list_add_last().
00093 : new list node*/ 00094 ib_list_t* list, /* in: list */ 00095 ib_list_node_t* prev_node, /* in: node preceding new node (can 00096 be NULL) */ 00097 void* data, /* in: data */ 00098 mem_heap_t* heap) /* in: memory heap to use */ 00099 { 00100 ib_list_node_t* node = mem_heap_alloc(heap, sizeof(ib_list_node_t)); 00101 00102 node->data = data; 00103 00104 if (!list->first) { 00105 /* Empty list. */ 00106 00107 ut_a(!prev_node); 00108 00109 node->prev = NULL; 00110 node->next = NULL; 00111 00112 list->first = node; 00113 list->last = node; 00114 } else if (!prev_node) { 00115 /* Start of list. */ 00116 00117 node->prev = NULL; 00118 node->next = list->first; 00119 00120 list->first->prev = node; 00121 00122 list->first = node; 00123 } else { 00124 /* Middle or end of list. */ 00125 00126 node->prev = prev_node; 00127 node->next = prev_node->next; 00128 00129 prev_node->next = node; 00130 00131 if (node->next) { 00132 node->next->prev = node; 00133 } else { 00134 list->last = node; 00135 } 00136 } 00137 00138 return(node); 00139 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ib_list_node_t* ib_list_add_first | ( | ib_list_t * | list, | |
| void * | data, | |||
| mem_heap_t * | heap | |||
| ) |
Definition at line 63 of file ut0list.c.
References ib_list_add_after(), ib_list_get_first(), and list().
00065 : new list node*/ 00066 ib_list_t* list, /* in: list */ 00067 void* data, /* in: data */ 00068 mem_heap_t* heap) /* in: memory heap to use */ 00069 { 00070 return(ib_list_add_after(list, ib_list_get_first(list), data, heap)); 00071 }
Here is the call graph for this function:

| ib_list_node_t* ib_list_add_last | ( | ib_list_t * | list, | |
| void * | data, | |||
| mem_heap_t * | heap | |||
| ) |
Definition at line 77 of file ut0list.c.
References ib_list_add_after(), ib_list_get_last(), and list().
Referenced by ib_wqueue_add().
00079 : new list node*/ 00080 ib_list_t* list, /* in: list */ 00081 void* data, /* in: data */ 00082 mem_heap_t* heap) /* in: memory heap to use */ 00083 { 00084 return(ib_list_add_after(list, ib_list_get_last(list), data, heap)); 00085 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ib_list_t* ib_list_create | ( | void | ) |
Definition at line 10 of file ut0list.c.
References FALSE, list(), mem_alloc, and NULL.
Referenced by ib_wqueue_create().
00012 : list */ 00013 { 00014 ib_list_t* list = mem_alloc(sizeof(ib_list_t)); 00015 00016 list->first = NULL; 00017 list->last = NULL; 00018 list->is_heap_list = FALSE; 00019 00020 return(list); 00021 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ib_list_t* ib_list_create_heap | ( | mem_heap_t * | heap | ) |
Definition at line 28 of file ut0list.c.
References list(), mem_heap_alloc(), NULL, and TRUE.
00030 : list */ 00031 mem_heap_t* heap) /* in: memory heap to use */ 00032 { 00033 ib_list_t* list = mem_heap_alloc(heap, sizeof(ib_list_t)); 00034 00035 list->first = NULL; 00036 list->last = NULL; 00037 list->is_heap_list = TRUE; 00038 00039 return(list); 00040 }
Here is the call graph for this function:

| void ib_list_free | ( | ib_list_t * | list | ) |
Definition at line 46 of file ut0list.c.
References list(), mem_free, and ut_a.
Referenced by ib_wqueue_free().
00048 : list */ 00049 { 00050 ut_a(!list->is_heap_list); 00051 00052 /* We don't check that the list is empty because it's entirely valid 00053 to e.g. have all the nodes allocated from a single heap that is then 00054 freed after the list itself is freed. */ 00055 00056 mem_free(list); 00057 }
Here is the call graph for this function:

Here is the caller graph for this function:

| UNIV_INLINE ib_list_node_t* ib_list_get_first | ( | ib_list_t * | list | ) |
Referenced by ib_list_add_first(), ib_wqueue_free(), and ib_wqueue_wait().
Here is the caller graph for this function:

| UNIV_INLINE ib_list_node_t* ib_list_get_last | ( | ib_list_t * | list | ) |
| void ib_list_remove | ( | ib_list_t * | list, | |
| ib_list_node_t * | node | |||
| ) |
Definition at line 145 of file ut0list.c.
References list(), ib_list_node_struct::next, ib_list_node_struct::prev, and ut_ad.
Referenced by ib_wqueue_wait().
00147 : list */ 00148 ib_list_node_t* node) /* in: node to remove */ 00149 { 00150 if (node->prev) { 00151 node->prev->next = node->next; 00152 } else { 00153 /* First item in list. */ 00154 00155 ut_ad(list->first == node); 00156 00157 list->first = node->next; 00158 } 00159 00160 if (node->next) { 00161 node->next->prev = node->prev; 00162 } else { 00163 /* Last item in list. */ 00164 00165 ut_ad(list->last == node); 00166 00167 list->last = node->prev; 00168 } 00169 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.4.7

