Drizzled Public API Documentation

fut0lst.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; version 2 of the License.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT
00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with
00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
00015 St, Fifth Floor, Boston, MA 02110-1301 USA
00016 
00017 *****************************************************************************/
00018 
00019 /******************************************************************/
00026 #pragma once
00027 #ifndef fut0lst_h
00028 #define fut0lst_h
00029 
00030 #include "univ.i"
00031 
00032 #include "fil0fil.h"
00033 #include "mtr0mtr.h"
00034 
00035 
00036 /* The C 'types' of base node and list node: these should be used to
00037 write self-documenting code. Of course, the sizeof macro cannot be
00038 applied to these types! */
00039 
00040 typedef byte  flst_base_node_t;
00041 typedef byte  flst_node_t;
00042 
00043 /* The physical size of a list base node in bytes */
00044 #define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
00045 
00046 /* The physical size of a list node in bytes */
00047 #define FLST_NODE_SIZE    (2 * FIL_ADDR_SIZE)
00048 
00049 #ifndef UNIV_HOTBACKUP
00050 /********************************************************************/
00052 UNIV_INLINE
00053 void
00054 flst_init(
00055 /*======*/
00056   flst_base_node_t* base, 
00057   mtr_t*      mtr); 
00058 /********************************************************************/
00060 UNIV_INTERN
00061 void
00062 flst_add_last(
00063 /*==========*/
00064   flst_base_node_t* base, 
00065   flst_node_t*    node, 
00066   mtr_t*      mtr); 
00067 /********************************************************************/
00069 UNIV_INTERN
00070 void
00071 flst_add_first(
00072 /*===========*/
00073   flst_base_node_t* base, 
00074   flst_node_t*    node, 
00075   mtr_t*      mtr); 
00076 /********************************************************************/
00078 UNIV_INTERN
00079 void
00080 flst_insert_after(
00081 /*==============*/
00082   flst_base_node_t* base, 
00083   flst_node_t*    node1,  
00084   flst_node_t*    node2,  
00085   mtr_t*      mtr); 
00086 /********************************************************************/
00088 UNIV_INTERN
00089 void
00090 flst_insert_before(
00091 /*===============*/
00092   flst_base_node_t* base, 
00093   flst_node_t*    node2,  
00094   flst_node_t*    node3,  
00095   mtr_t*      mtr); 
00096 /********************************************************************/
00098 UNIV_INTERN
00099 void
00100 flst_remove(
00101 /*========*/
00102   flst_base_node_t* base, 
00103   flst_node_t*    node2,  
00104   mtr_t*      mtr); 
00105 /********************************************************************/
00109 UNIV_INTERN
00110 void
00111 flst_cut_end(
00112 /*=========*/
00113   flst_base_node_t* base, 
00114   flst_node_t*    node2,  
00115   ulint     n_nodes,
00117   mtr_t*      mtr); 
00118 /********************************************************************/
00122 UNIV_INTERN
00123 void
00124 flst_truncate_end(
00125 /*==============*/
00126   flst_base_node_t* base, 
00127   flst_node_t*    node2,  
00128   ulint     n_nodes,
00129   mtr_t*      mtr); 
00130 /********************************************************************/
00133 UNIV_INLINE
00134 ulint
00135 flst_get_len(
00136 /*=========*/
00137   const flst_base_node_t* base, 
00138   mtr_t*      mtr); 
00139 /********************************************************************/
00142 UNIV_INLINE
00143 fil_addr_t
00144 flst_get_first(
00145 /*===========*/
00146   const flst_base_node_t* base, 
00147   mtr_t*      mtr); 
00148 /********************************************************************/
00151 UNIV_INLINE
00152 fil_addr_t
00153 flst_get_last(
00154 /*==========*/
00155   const flst_base_node_t* base, 
00156   mtr_t*      mtr); 
00157 /********************************************************************/
00160 UNIV_INLINE
00161 fil_addr_t
00162 flst_get_next_addr(
00163 /*===============*/
00164   const flst_node_t*  node, 
00165   mtr_t*      mtr); 
00166 /********************************************************************/
00169 UNIV_INLINE
00170 fil_addr_t
00171 flst_get_prev_addr(
00172 /*===============*/
00173   const flst_node_t*  node, 
00174   mtr_t*      mtr); 
00175 /********************************************************************/
00177 UNIV_INLINE
00178 void
00179 flst_write_addr(
00180 /*============*/
00181   fil_faddr_t*  faddr,  
00182   fil_addr_t  addr, 
00183   mtr_t*    mtr); 
00184 /********************************************************************/
00187 UNIV_INLINE
00188 fil_addr_t
00189 flst_read_addr(
00190 /*===========*/
00191   const fil_faddr_t*  faddr,  
00192   mtr_t*      mtr); 
00193 /********************************************************************/
00196 UNIV_INTERN
00197 ibool
00198 flst_validate(
00199 /*==========*/
00200   const flst_base_node_t* base, 
00201   mtr_t*      mtr1);  
00202 /********************************************************************/
00204 UNIV_INTERN
00205 void
00206 flst_print(
00207 /*=======*/
00208   const flst_base_node_t* base, 
00209   mtr_t*      mtr); 
00212 #ifndef UNIV_NONINL
00213 #include "fut0lst.ic"
00214 #endif
00215 
00216 #endif /* !UNIV_HOTBACKUP */
00217 
00218 #endif