drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
ut0byte.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1994, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/******************************************************************/
25
26#pragma once
27#ifndef ut0byte_h
28#define ut0byte_h
29
30
31
32#include "univ.i"
33
34/*******************************************************/
37UNIV_INLINE
38ib_uint64_t
40/*==========*/
41 ulint high,
42 ulint low)
43 __attribute__((const));
44
45/********************************************************/
48UNIV_INLINE
49ib_uint64_t
51/*=================*/
52 ib_uint64_t n,
53 ulint align_no);
55/********************************************************/
58UNIV_INLINE
59ib_uint64_t
61/*===============*/
62 ib_uint64_t n,
63 ulint align_no);
65/*********************************************************/
68UNIV_INLINE
69void*
71/*=====*/
72 const void* ptr,
73 ulint align_no);
74/*********************************************************/
78UNIV_INLINE
79void*
81/*==========*/
82 const void* ptr,
83 ulint align_no)
84 __attribute__((const));
85/*********************************************************/
89UNIV_INLINE
90ulint
92/*============*/
93 const void* ptr,
94 ulint align_no)
95 __attribute__((const));
96/*****************************************************************/
99UNIV_INLINE
100ibool
102/*===========*/
103 ulint a,
104 ulint n);
105/*****************************************************************/
108UNIV_INLINE
109ulint
111/*===========*/
112 ulint a,
113 ulint n,
114 ibool val);
115
116#ifndef UNIV_NONINL
117#include "ut0byte.ic"
118#endif
119
120#endif
UNIV_INLINE void * ut_align(const void *ptr, ulint align_no)
UNIV_INLINE ib_uint64_t ut_ull_create(ulint high, ulint low) __attribute__((const))
UNIV_INLINE ulint ut_align_offset(const void *ptr, ulint align_no) __attribute__((const))
UNIV_INLINE ib_uint64_t ut_uint64_align_up(ib_uint64_t n, ulint align_no)
UNIV_INLINE void * ut_align_down(const void *ptr, ulint align_no) __attribute__((const))
UNIV_INLINE ibool ut_bit_get_nth(ulint a, ulint n)
UNIV_INLINE ulint ut_bit_set_nth(ulint a, ulint n, ibool val)
UNIV_INLINE ib_uint64_t ut_uint64_align_down(ib_uint64_t n, ulint align_no)