summaryrefslogtreecommitdiff
path: root/innobase/lock
diff options
context:
space:
mode:
authorjoerg@mysql.com <>2004-10-07 12:02:22 +0200
committerjoerg@mysql.com <>2004-10-07 12:02:22 +0200
commita9fc6cfd31ea4b17e01bc6151e6f0109e3ab3b7b (patch)
tree59edee8126501bab3f2e0a78641777b0f0630b47 /innobase/lock
parente5483ab3bd754ef133abee2176b3501b8a300bff (diff)
downloadmariadb-git-a9fc6cfd31ea4b17e01bc6151e6f0109e3ab3b7b.tar.gz
Correct an 'unresolved identifier' problem caused by an "inline"
function being used before it was defined - "forward" declaration was insufficient.
Diffstat (limited to 'innobase/lock')
-rw-r--r--innobase/lock/lock0lock.c54
1 files changed, 23 insertions, 31 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index e6d478070b0..68073647248 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -373,7 +373,29 @@ lock_rec_get_nth_bit(
/*=================*/
/* out: TRUE if bit set */
lock_t* lock, /* in: record lock */
- ulint i); /* in: index of the bit */
+ ulint i) /* in: index of the bit */
+{
+ ulint byte_index;
+ ulint bit_index;
+ ulint b;
+
+ ut_ad(lock);
+ ut_ad(lock_get_type(lock) == LOCK_REC);
+
+ if (i >= lock->un_member.rec_lock.n_bits) {
+
+ return(FALSE);
+ }
+
+ byte_index = i / 8;
+ bit_index = i % 8;
+
+ b = (ulint)*((byte*)lock + sizeof(lock_t) + byte_index);
+
+ return(ut_bit_get_nth(b, bit_index));
+}
+
+/*************************************************************************/
#define lock_mutex_enter_kernel() mutex_enter(&kernel_mutex)
#define lock_mutex_exit_kernel() mutex_exit(&kernel_mutex)
@@ -883,36 +905,6 @@ lock_rec_get_n_bits(
return(lock->un_member.rec_lock.n_bits);
}
-/*************************************************************************
-Gets the nth bit of a record lock. */
-UNIV_INLINE
-ibool
-lock_rec_get_nth_bit(
-/*=================*/
- /* out: TRUE if bit set */
- lock_t* lock, /* in: record lock */
- ulint i) /* in: index of the bit */
-{
- ulint byte_index;
- ulint bit_index;
- ulint b;
-
- ut_ad(lock);
- ut_ad(lock_get_type(lock) == LOCK_REC);
-
- if (i >= lock->un_member.rec_lock.n_bits) {
-
- return(FALSE);
- }
-
- byte_index = i / 8;
- bit_index = i % 8;
-
- b = (ulint)*((byte*)lock + sizeof(lock_t) + byte_index);
-
- return(ut_bit_get_nth(b, bit_index));
-}
-
/**************************************************************************
Sets the nth bit of a record lock to TRUE. */
UNIV_INLINE