diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
commit | 898f6f48b79d1f2c334fb559225b2b0fade5ea93 (patch) | |
tree | 84df8eecd942b650f172cbd67050ee8984c0d52b /storage/xtradb/include/ut0ut.ic | |
parent | 275c0a7f96502b33f763fb9388dcc1c289e4792b (diff) | |
parent | 2bde0c5e6d31583e5197e3b513f572a693161f62 (diff) | |
download | mariadb-git-898f6f48b79d1f2c334fb559225b2b0fade5ea93.tar.gz |
Merge XtraDB 8 into MariaDB.
Diffstat (limited to 'storage/xtradb/include/ut0ut.ic')
-rw-r--r-- | storage/xtradb/include/ut0ut.ic | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/storage/xtradb/include/ut0ut.ic b/storage/xtradb/include/ut0ut.ic index e4e0a2acce6..6f55c7e410e 100644 --- a/storage/xtradb/include/ut0ut.ic +++ b/storage/xtradb/include/ut0ut.ic @@ -16,50 +16,51 @@ Place, Suite 330, Boston, MA 02111-1307 USA *****************************************************************************/ -/****************************************************************** +/**************************************************************//** +@file include/ut0ut.ic Various utilities Created 5/30/1994 Heikki Tuuri *******************************************************************/ -/********************************************************** -Calculates the minimum of two ulints. */ +/******************************************************//** +Calculates the minimum of two ulints. +@return minimum */ UNIV_INLINE ulint ut_min( /*===*/ - /* out: minimum */ - ulint n1, /* in: first number */ - ulint n2) /* in: second number */ + ulint n1, /*!< in: first number */ + ulint n2) /*!< in: second number */ { return((n1 <= n2) ? n1 : n2); } -/********************************************************** -Calculates the maximum of two ulints. */ +/******************************************************//** +Calculates the maximum of two ulints. +@return maximum */ UNIV_INLINE ulint ut_max( /*===*/ - /* out: maximum */ - ulint n1, /* in: first number */ - ulint n2) /* in: second number */ + ulint n1, /*!< in: first number */ + ulint n2) /*!< in: second number */ { return((n1 <= n2) ? n2 : n1); } -/******************************************************************** +/****************************************************************//** Calculates minimum of two ulint-pairs. */ UNIV_INLINE void ut_pair_min( /*========*/ - ulint* a, /* out: more significant part of minimum */ - ulint* b, /* out: less significant part of minimum */ - ulint a1, /* in: more significant part of first pair */ - ulint b1, /* in: less significant part of first pair */ - ulint a2, /* in: more significant part of second pair */ - ulint b2) /* in: less significant part of second pair */ + ulint* a, /*!< out: more significant part of minimum */ + ulint* b, /*!< out: less significant part of minimum */ + ulint a1, /*!< in: more significant part of first pair */ + ulint b1, /*!< in: less significant part of first pair */ + ulint a2, /*!< in: more significant part of second pair */ + ulint b2) /*!< in: less significant part of second pair */ { if (a1 == a2) { *a = a1; @@ -73,15 +74,15 @@ ut_pair_min( } } -/********************************************************** -Compares two ulints. */ +/******************************************************//** +Compares two ulints. +@return 1 if a > b, 0 if a == b, -1 if a < b */ UNIV_INLINE int ut_ulint_cmp( /*=========*/ - /* out: 1 if a > b, 0 if a == b, -1 if a < b */ - ulint a, /* in: ulint */ - ulint b) /* in: ulint */ + ulint a, /*!< in: ulint */ + ulint b) /*!< in: ulint */ { if (a < b) { return(-1); @@ -92,17 +93,17 @@ ut_ulint_cmp( } } -/*********************************************************** -Compares two pairs of ulints. */ +/*******************************************************//** +Compares two pairs of ulints. +@return -1 if a < b, 0 if a == b, 1 if a > b */ UNIV_INLINE int ut_pair_cmp( /*========*/ - /* out: -1 if a < b, 0 if a == b, 1 if a > b */ - ulint a1, /* in: more significant part of first pair */ - ulint a2, /* in: less significant part of first pair */ - ulint b1, /* in: more significant part of second pair */ - ulint b2) /* in: less significant part of second pair */ + ulint a1, /*!< in: more significant part of first pair */ + ulint a2, /*!< in: less significant part of first pair */ + ulint b1, /*!< in: more significant part of second pair */ + ulint b2) /*!< in: less significant part of second pair */ { if (a1 > b1) { return(1); @@ -117,15 +118,15 @@ ut_pair_cmp( } } -/***************************************************************** +/*************************************************************//** Calculates fast the 2-logarithm of a number, rounded upward to an -integer. */ +integer. +@return logarithm in the base 2, rounded upward */ UNIV_INLINE ulint ut_2_log( /*=====*/ - /* out: logarithm in the base 2, rounded upward */ - ulint n) /* in: number != 0 */ + ulint n) /*!< in: number != 0 */ { ulint res; @@ -148,14 +149,14 @@ ut_2_log( return(res + 1); } -/***************************************************************** -Calculates 2 to power n. */ +/*************************************************************//** +Calculates 2 to power n. +@return 2 to power n */ UNIV_INLINE ulint ut_2_exp( /*=====*/ - /* out: 2 to power n */ - ulint n) /* in: number */ + ulint n) /*!< in: number */ { return((ulint) 1 << n); } |