Drizzled Public API Documentation

buf0types.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 buf0types_h
00028 #define buf0types_h
00029 
00031 typedef struct buf_page_struct    buf_page_t;
00033 typedef struct buf_block_struct   buf_block_t;
00035 typedef struct buf_chunk_struct   buf_chunk_t;
00037 typedef struct buf_pool_struct    buf_pool_t;
00039 typedef struct buf_pool_stat_struct buf_pool_stat_t;
00041 typedef struct buf_buddy_stat_struct  buf_buddy_stat_t;
00042 
00044 typedef byte  buf_frame_t;
00045 
00047 enum buf_flush {
00048   BUF_FLUSH_LRU = 0,    
00049   BUF_FLUSH_SINGLE_PAGE,    
00050   BUF_FLUSH_LIST,     
00052   BUF_FLUSH_N_TYPES   
00053 };
00054 
00056 enum buf_io_fix {
00057   BUF_IO_NONE = 0,    
00058   BUF_IO_READ,      
00059   BUF_IO_WRITE      
00060 };
00061 
00063 /* @{ */
00064 #if UNIV_WORD_SIZE <= 4 /* 32-bit system */
00065 
00066 # define BUF_BUDDY_LOW_SHIFT  6
00067 #else /* 64-bit system */
00068 
00069 # define BUF_BUDDY_LOW_SHIFT  7
00070 #endif
00071 #define BUF_BUDDY_LOW   (1 << BUF_BUDDY_LOW_SHIFT)
00072 
00075 #define BUF_BUDDY_SIZES   (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
00076 
00081 #define BUF_BUDDY_HIGH  (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
00082 /* @} */
00083 
00084 #endif
00085