Drizzled Public API Documentation

fut0lst.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1995, 2009, Innobase Oy. 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., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /******************************************************************/
26 #pragma once
27 #ifndef fut0lst_h
28 #define fut0lst_h
29 
30 #include "univ.i"
31 
32 #include "fil0fil.h"
33 #include "mtr0mtr.h"
34 
35 
36 /* The C 'types' of base node and list node: these should be used to
37 write self-documenting code. Of course, the sizeof macro cannot be
38 applied to these types! */
39 
40 typedef byte flst_base_node_t;
41 typedef byte flst_node_t;
42 
43 /* The physical size of a list base node in bytes */
44 #define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
45 
46 /* The physical size of a list node in bytes */
47 #define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
48 
49 #ifndef UNIV_HOTBACKUP
50 /********************************************************************/
52 UNIV_INLINE
53 void
54 flst_init(
55 /*======*/
56  flst_base_node_t* base,
57  mtr_t* mtr);
58 /********************************************************************/
60 UNIV_INTERN
61 void
63 /*==========*/
64  flst_base_node_t* base,
65  flst_node_t* node,
66  mtr_t* mtr);
67 /********************************************************************/
69 UNIV_INTERN
70 void
72 /*===========*/
73  flst_base_node_t* base,
74  flst_node_t* node,
75  mtr_t* mtr);
76 /********************************************************************/
78 UNIV_INTERN
79 void
81 /*==============*/
82  flst_base_node_t* base,
83  flst_node_t* node1,
84  flst_node_t* node2,
85  mtr_t* mtr);
86 /********************************************************************/
88 UNIV_INTERN
89 void
91 /*===============*/
92  flst_base_node_t* base,
93  flst_node_t* node2,
94  flst_node_t* node3,
95  mtr_t* mtr);
96 /********************************************************************/
98 UNIV_INTERN
99 void
101 /*========*/
102  flst_base_node_t* base,
103  flst_node_t* node2,
104  mtr_t* mtr);
105 /********************************************************************/
109 UNIV_INTERN
110 void
112 /*=========*/
113  flst_base_node_t* base,
114  flst_node_t* node2,
115  ulint n_nodes,
117  mtr_t* mtr);
118 /********************************************************************/
122 UNIV_INTERN
123 void
125 /*==============*/
126  flst_base_node_t* base,
127  flst_node_t* node2,
128  ulint n_nodes,
129  mtr_t* mtr);
130 /********************************************************************/
133 UNIV_INLINE
134 ulint
136 /*=========*/
137  const flst_base_node_t* base,
138  mtr_t* mtr);
139 /********************************************************************/
142 UNIV_INLINE
145 /*===========*/
146  const flst_base_node_t* base,
147  mtr_t* mtr);
148 /********************************************************************/
151 UNIV_INLINE
154 /*==========*/
155  const flst_base_node_t* base,
156  mtr_t* mtr);
157 /********************************************************************/
160 UNIV_INLINE
163 /*===============*/
164  const flst_node_t* node,
165  mtr_t* mtr);
166 /********************************************************************/
169 UNIV_INLINE
172 /*===============*/
173  const flst_node_t* node,
174  mtr_t* mtr);
175 /********************************************************************/
177 UNIV_INLINE
178 void
180 /*============*/
181  fil_faddr_t* faddr,
182  fil_addr_t addr,
183  mtr_t* mtr);
184 /********************************************************************/
187 UNIV_INLINE
190 /*===========*/
191  const fil_faddr_t* faddr,
192  mtr_t* mtr);
193 /********************************************************************/
196 UNIV_INTERN
197 ibool
199 /*==========*/
200  const flst_base_node_t* base,
201  mtr_t* mtr1);
202 /********************************************************************/
204 UNIV_INTERN
205 void
206 flst_print(
207 /*=======*/
208  const flst_base_node_t* base,
209  mtr_t* mtr);
212 #ifndef UNIV_NONINL
213 #include "fut0lst.ic"
214 #endif
215 
216 #endif /* !UNIV_HOTBACKUP */
217 
218 #endif
UNIV_INLINE void flst_write_addr(fil_faddr_t *faddr, fil_addr_t addr, mtr_t *mtr)
UNIV_INLINE fil_addr_t flst_get_last(const flst_base_node_t *base, mtr_t *mtr)
UNIV_INLINE fil_addr_t flst_get_prev_addr(const flst_node_t *node, mtr_t *mtr)
UNIV_INLINE fil_addr_t flst_get_next_addr(const flst_node_t *node, mtr_t *mtr)
UNIV_INTERN ibool flst_validate(const flst_base_node_t *base, mtr_t *mtr1)
Definition: fut0lst.cc:444
UNIV_INTERN void flst_add_last(flst_base_node_t *base, flst_node_t *node, mtr_t *mtr)
Definition: fut0lst.cc:75
UNIV_INTERN void flst_truncate_end(flst_base_node_t *base, flst_node_t *node2, ulint n_nodes, mtr_t *mtr)
Definition: fut0lst.cc:404
byte fil_faddr_t
Definition: fil0fil.h:54
UNIV_INLINE void flst_init(flst_base_node_t *base, mtr_t *mtr)
UNIV_INTERN void flst_remove(flst_base_node_t *base, flst_node_t *node2, mtr_t *mtr)
Definition: fut0lst.cc:270
UNIV_INLINE fil_addr_t flst_read_addr(const fil_faddr_t *faddr, mtr_t *mtr)
UNIV_INLINE fil_addr_t flst_get_first(const flst_base_node_t *base, mtr_t *mtr)
UNIV_INTERN void flst_insert_after(flst_base_node_t *base, flst_node_t *node1, flst_node_t *node2, mtr_t *mtr)
Definition: fut0lst.cc:161
UNIV_INTERN void flst_print(const flst_base_node_t *base, mtr_t *mtr)
Definition: fut0lst.cc:510
UNIV_INTERN void flst_cut_end(flst_base_node_t *base, flst_node_t *node2, ulint n_nodes, mtr_t *mtr)
Definition: fut0lst.cc:347
UNIV_INTERN void flst_add_first(flst_base_node_t *base, flst_node_t *node, mtr_t *mtr)
Definition: fut0lst.cc:118
UNIV_INTERN void flst_insert_before(flst_base_node_t *base, flst_node_t *node2, flst_node_t *node3, mtr_t *mtr)
Definition: fut0lst.cc:216
UNIV_INLINE ulint flst_get_len(const flst_base_node_t *base, mtr_t *mtr)