InnoDB Plugin  1.0
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*
71 /*================*/
72  mem_heap_t* heap);
74 /****************************************************************/
76 UNIV_INTERN
77 void
79 /*=========*/
80  ib_list_t* list);
82 /****************************************************************/
85 UNIV_INTERN
88 /*==============*/
89  ib_list_t* list,
90  void* data,
91  mem_heap_t* heap);
93 /****************************************************************/
96 UNIV_INTERN
99 /*=============*/
100  ib_list_t* list,
101  void* data,
102  mem_heap_t* heap);
104 /****************************************************************/
107 UNIV_INTERN
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
122 /*===========*/
123  ib_list_t* list,
124  ib_list_node_t* node);
126 /****************************************************************/
129 UNIV_INLINE
132 /*==============*/
133  ib_list_t* list);
135 /****************************************************************/
138 UNIV_INLINE
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 {
159 };
160 
161 /* A list node. */
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. */
173  void* data;
174 };
175 
176 #ifndef UNIV_NONINL
177 #include "ut0list.ic"
178 #endif
179 
180 #endif