00001 /***************************************************************************** 00002 00003 Copyright (C) 1994, 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 ut0byte_h 00028 #define ut0byte_h 00029 00030 00031 00032 #include "univ.i" 00033 00034 /*******************************************************/ 00037 UNIV_INLINE 00038 ib_uint64_t 00039 ut_ull_create( 00040 /*==========*/ 00041 ulint high, 00042 ulint low) 00043 __attribute__((const)); 00044 00045 /********************************************************/ 00048 UNIV_INLINE 00049 ib_uint64_t 00050 ut_uint64_align_down( 00051 /*=================*/ 00052 ib_uint64_t n, 00053 ulint align_no); 00055 /********************************************************/ 00058 UNIV_INLINE 00059 ib_uint64_t 00060 ut_uint64_align_up( 00061 /*===============*/ 00062 ib_uint64_t n, 00063 ulint align_no); 00065 /*********************************************************/ 00068 UNIV_INLINE 00069 void* 00070 ut_align( 00071 /*=====*/ 00072 const void* ptr, 00073 ulint align_no); 00074 /*********************************************************/ 00078 UNIV_INLINE 00079 void* 00080 ut_align_down( 00081 /*==========*/ 00082 const void* ptr, 00083 ulint align_no) 00084 __attribute__((const)); 00085 /*********************************************************/ 00089 UNIV_INLINE 00090 ulint 00091 ut_align_offset( 00092 /*============*/ 00093 const void* ptr, 00094 ulint align_no) 00095 __attribute__((const)); 00096 /*****************************************************************/ 00099 UNIV_INLINE 00100 ibool 00101 ut_bit_get_nth( 00102 /*===========*/ 00103 ulint a, 00104 ulint n); 00105 /*****************************************************************/ 00108 UNIV_INLINE 00109 ulint 00110 ut_bit_set_nth( 00111 /*===========*/ 00112 ulint a, 00113 ulint n, 00114 ibool val); 00116 #ifndef UNIV_NONINL 00117 #include "ut0byte.ic" 00118 #endif 00119 00120 #endif