summaryrefslogtreecommitdiff
path: root/storage/innobase/include/ut0rnd.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/ut0rnd.h')
-rw-r--r--storage/innobase/include/ut0rnd.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h
index 6ed3ee3b2e5..09e66034c4f 100644
--- a/storage/innobase/include/ut0rnd.h
+++ b/storage/innobase/include/ut0rnd.h
@@ -45,7 +45,7 @@ ut_rnd_set_seed(
ulint seed); /*!< in: seed */
/********************************************************//**
The following function generates a series of 'random' ulint integers.
-@return the next 'random' number */
+@return the next 'random' number */
UNIV_INLINE
ulint
ut_rnd_gen_next_ulint(
@@ -56,32 +56,26 @@ The following function generates 'random' ulint integers which
enumerate the value space (let there be N of them) of ulint integers
in a pseudo-random fashion. Note that the same integer is repeated
always after N calls to the generator.
-@return the 'random' number */
+@return the 'random' number */
UNIV_INLINE
ulint
ut_rnd_gen_ulint(void);
/*==================*/
/********************************************************//**
Generates a random integer from a given interval.
-@return the 'random' number */
+@return the 'random' number */
UNIV_INLINE
ulint
ut_rnd_interval(
/*============*/
ulint low, /*!< in: low limit; can generate also this value */
ulint high); /*!< in: high limit; can generate also this value */
-/*********************************************************//**
-Generates a random iboolean value.
-@return the random value */
-UNIV_INLINE
-ibool
-ut_rnd_gen_ibool(void);
-/*=================*/
+
/*******************************************************//**
The following function generates a hash value for a ulint integer
to a hash table of size table_size, which should be a prime or some
random number to work reliably.
-@return hash value */
+@return hash value */
UNIV_INLINE
ulint
ut_hash_ulint(
@@ -90,7 +84,7 @@ ut_hash_ulint(
ulint table_size); /*!< in: hash table size */
/*************************************************************//**
Folds a 64-bit integer.
-@return folded value */
+@return folded value */
UNIV_INLINE
ulint
ut_fold_ull(
@@ -99,18 +93,17 @@ ut_fold_ull(
MY_ATTRIBUTE((const));
/*************************************************************//**
Folds a character string ending in the null character.
-@return folded value */
+@return folded value */
UNIV_INLINE
ulint
ut_fold_string(
/*===========*/
const char* str) /*!< in: null-terminated string */
- MY_ATTRIBUTE((pure));
+ MY_ATTRIBUTE((warn_unused_result, pure));
/***********************************************************//**
Looks for a prime number slightly greater than the given argument.
The prime is chosen so that it is not near any power of 2.
-@return prime */
-UNIV_INTERN
+@return prime */
ulint
ut_find_prime(
/*==========*/
@@ -121,7 +114,7 @@ ut_find_prime(
/*************************************************************//**
Folds a pair of ulints.
-@return folded value */
+@return folded value */
UNIV_INLINE
ulint
ut_fold_ulint_pair(
@@ -131,7 +124,7 @@ ut_fold_ulint_pair(
MY_ATTRIBUTE((const));
/*************************************************************//**
Folds a binary string.
-@return folded value */
+@return folded value */
UNIV_INLINE
ulint
ut_fold_binary(