Drizzled Public API Documentation

buf0types.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 buf0types_h
28 #define buf0types_h
29 
31 typedef struct buf_page_struct buf_page_t;
37 typedef struct buf_pool_struct buf_pool_t;
42 
44 typedef byte buf_frame_t;
45 
47 enum buf_flush {
53 };
54 
56 enum buf_io_fix {
60 };
61 
63 /* @{ */
64 #if UNIV_WORD_SIZE <= 4 /* 32-bit system */
65 
66 # define BUF_BUDDY_LOW_SHIFT 6
67 #else /* 64-bit system */
68 
69 # define BUF_BUDDY_LOW_SHIFT 7
70 #endif
71 #define BUF_BUDDY_LOW (1 << BUF_BUDDY_LOW_SHIFT)
72 
75 #define BUF_BUDDY_SIZES (UNIV_PAGE_SIZE_SHIFT - BUF_BUDDY_LOW_SHIFT)
76 
77 #define BUF_BUDDY_SIZES_MAX (UNIV_PAGE_SIZE_SHIFT_MAX - BUF_BUDDY_LOW_SHIFT)
78 
82 #define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES)
83 /* @} */
84 
85 #endif
86