InnoDB Plugin
1.0
|
Go to the source code of this file.
Functions | |
UNIV_INLINE ib_uint64_t | ut_ull_create (ulint high, ulint low)) |
UNIV_INLINE ib_uint64_t | ut_uint64_align_down (ib_uint64_t n, ulint align_no) |
UNIV_INLINE ib_uint64_t | ut_uint64_align_up (ib_uint64_t n, ulint align_no) |
UNIV_INLINE void * | ut_align (const void *ptr, ulint align_no) |
UNIV_INLINE void * | ut_align_down (const void *ptr, ulint align_no)) |
UNIV_INLINE ulint | ut_align_offset (const void *ptr, ulint align_no)) |
UNIV_INLINE ibool | ut_bit_get_nth (ulint a, ulint n) |
UNIV_INLINE ulint | ut_bit_set_nth (ulint a, ulint n, ibool val) |
Utilities for byte operations
Created 1/20/1994 Heikki Tuuri
UNIV_INLINE void* ut_align | ( | const void * | ptr, |
ulint | align_no | ||
) |
The following function rounds up a pointer to the nearest aligned address.
The following function rounds up a pointer to the nearest aligned address.
ptr | in: pointer |
align_no | in: align by this number |
UNIV_INLINE void* ut_align_down | ( | const void * | ptr, |
ulint | align_no | ||
) |
The following function rounds down a pointer to the nearest aligned address.
ptr | in: pointer |
align_no | in: align by this number |
UNIV_INLINE ulint ut_align_offset | ( | const void * | ptr, |
ulint | align_no | ||
) |
The following function computes the offset of a pointer from the nearest aligned address.
ptr | in: pointer |
align_no | in: align by this number |
UNIV_INLINE ibool ut_bit_get_nth | ( | ulint | a, |
ulint | n | ||
) |
Gets the nth bit of a ulint.
Gets the nth bit of a ulint.
a | in: ulint |
n | in: nth bit requested |
UNIV_INLINE ulint ut_bit_set_nth | ( | ulint | a, |
ulint | n, | ||
ibool | val | ||
) |
Sets the nth bit of a ulint.
Sets the nth bit of a ulint.
a | in: ulint |
n | in: nth bit requested |
val | in: value for the bit to set |
UNIV_INLINE ib_uint64_t ut_uint64_align_down | ( | ib_uint64_t | n, |
ulint | align_no | ||
) |
Rounds a 64-bit integer downward to a multiple of a power of 2.
Rounds a 64-bit integer downward to a multiple of a power of 2.
n | in: number to be rounded |
align_no | in: align by this number which must be a power of 2 |
UNIV_INLINE ib_uint64_t ut_uint64_align_up | ( | ib_uint64_t | n, |
ulint | align_no | ||
) |
Rounds ib_uint64_t upward to a multiple of a power of 2.
Rounds ib_uint64_t upward to a multiple of a power of 2.
n | in: number to be rounded |
align_no | in: align by this number which must be a power of 2 |
UNIV_INLINE ib_uint64_t ut_ull_create | ( | ulint | high, |
ulint | low | ||
) |
Creates a 64-bit integer out of two 32-bit integers.
high | in: high-order 32 bits |
low | in: low-order 32 bits |