InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
ut0list.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 2006, 2009, Oracle and/or its affiliates. All Rights Reserved.
4
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc.,
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17
*****************************************************************************/
18
19
/*******************************************************************/
26
/*******************************************************************/
46
#ifndef IB_LIST_H
47
#define IB_LIST_H
48
49
#include "
mem0mem.h
"
50
51
struct
ib_list_t
;
52
struct
ib_list_node_t
;
53
54
/****************************************************************/
58
UNIV_INTERN
59
ib_list_t
*
60
ib_list_create
(
void
);
61
/*=================*/
62
63
64
/****************************************************************/
68
UNIV_INTERN
69
ib_list_t
*
70
ib_list_create_heap
(
71
/*================*/
72
mem_heap_t
* heap);
74
/****************************************************************/
76
UNIV_INTERN
77
void
78
ib_list_free
(
79
/*=========*/
80
ib_list_t
* list);
82
/****************************************************************/
85
UNIV_INTERN
86
ib_list_node_t
*
87
ib_list_add_first
(
88
/*==============*/
89
ib_list_t
* list,
90
void
*
data
,
91
mem_heap_t
* heap);
93
/****************************************************************/
96
UNIV_INTERN
97
ib_list_node_t
*
98
ib_list_add_last
(
99
/*=============*/
100
ib_list_t
* list,
101
void
*
data
,
102
mem_heap_t
* heap);
104
/****************************************************************/
107
UNIV_INTERN
108
ib_list_node_t
*
109
ib_list_add_after
(
110
/*==============*/
111
ib_list_t
* list,
112
ib_list_node_t
* prev_node,
114
void
*
data
,
115
mem_heap_t
* heap);
117
/****************************************************************/
119
UNIV_INTERN
120
void
121
ib_list_remove
(
122
/*===========*/
123
ib_list_t
* list,
124
ib_list_node_t
* node);
126
/****************************************************************/
129
UNIV_INLINE
130
ib_list_node_t
*
131
ib_list_get_first
(
132
/*==============*/
133
ib_list_t
* list);
135
/****************************************************************/
138
UNIV_INLINE
139
ib_list_node_t
*
140
ib_list_get_last
(
141
/*=============*/
142
ib_list_t
* list);
144
/********************************************************************
145
Check if list is empty. */
146
UNIV_INLINE
147
ibool
148
ib_list_is_empty(
149
/*=============*/
150
/* out: TRUE if empty else */
151
const
ib_list_t
* list);
/* in: list */
152
153
/* List. */
154
struct
ib_list_t
{
155
ib_list_node_t
*
first
;
156
ib_list_node_t
*
last
;
157
ibool
is_heap_list
;
159
};
160
161
/* A list node. */
162
struct
ib_list_node_t
{
163
ib_list_node_t
*
prev
;
164
ib_list_node_t
*
next
;
165
void
*
data
;
166
};
167
168
/* Quite often, the only additional piece of data you need is the per-item
169
memory heap, so we have this generic struct available to use in those
170
cases. */
171
struct
ib_list_helper_t
{
172
mem_heap_t
*
heap
;
173
void
*
data
;
174
};
175
176
#ifndef UNIV_NONINL
177
#include "
ut0list.ic
"
178
#endif
179
180
#endif
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2