summaryrefslogtreecommitdiff
path: root/innobase/lock/lock0lock.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-02-20 16:34:09 +0200
committerunknown <marko@hundin.mysql.fi>2004-02-20 16:34:09 +0200
commit0eacf58fd5ebc665ce799a673739c97d6157b13b (patch)
tree96c04a7ccc804314e3737d02fc081513e1e827db /innobase/lock/lock0lock.c
parentf443541a36769eaacf9228ad517ed224c827c565 (diff)
downloadmariadb-git-0eacf58fd5ebc665ce799a673739c97d6157b13b.tar.gz
Many files:
Removed unused code .del-os0trash.c~8cae5c1695501117: Delete: innobase/os/os0trash.c dict0crea.c: Protect all sprintf(%s) with assertions BitKeeper/deleted/.del-os0trash.c~8cae5c1695501117: Delete: innobase/os/os0trash.c innobase/btr/btr0sea.c: Removed unused code innobase/buf/buf0buf.c: Removed unused code innobase/com/com0shm.c: Removed unused code innobase/data/data0data.c: Removed unused code innobase/dict/dict0crea.c: Removed unused code innobase/fsp/fsp0fsp.c: Removed unused code innobase/ha/ha0ha.c: Removed unused code innobase/include/btr0cur.h: Removed unused code innobase/include/btr0sea.h: Removed unused code innobase/include/buf0buf.ic: Removed unused code innobase/include/data0data.h: Removed unused code innobase/include/dict0crea.h: Removed unused code innobase/include/dict0dict.h: Removed unused code innobase/include/ibuf0ibuf.h: Removed unused code innobase/include/lock0lock.h: Removed unused code innobase/include/mem0dbg.h: Removed unused code innobase/include/mem0mem.ic: Removed unused code innobase/include/mtr0log.h: Removed unused code innobase/include/mtr0mtr.h: Removed unused code innobase/include/os0proc.h: Removed unused code innobase/include/os0thread.h: Removed unused code innobase/include/rem0cmp.ic: Removed unused code innobase/include/row0row.h: Removed unused code innobase/include/srv0srv.h: Removed unused code innobase/include/sync0sync.h: Removed unused code innobase/lock/lock0lock.c: Removed unused code innobase/log/log0recv.c: Removed unused code innobase/mem/mem0dbg.c: Removed unused code innobase/mtr/mtr0mtr.c: Removed unused code innobase/os/os0proc.c: Removed unused code innobase/page/page0page.c: Removed unused code innobase/que/que0que.c: Removed unused code innobase/rem/rem0cmp.c: Removed unused code innobase/row/row0ins.c: Removed unused code innobase/row/row0mysql.c: Removed unused code innobase/row/row0row.c: Removed unused code innobase/srv/srv0srv.c: Removed unused code innobase/srv/srv0start.c: Removed unused code innobase/sync/sync0sync.c: Removed unused code innobase/trx/trx0rec.c: Removed unused code innobase/trx/trx0trx.c: Removed unused code innobase/ut/ut0dbg.c: Removed unused code innobase/ut/ut0mem.c: Removed unused code innobase/ut/ut0ut.c: Removed unused code
Diffstat (limited to 'innobase/lock/lock0lock.c')
-rw-r--r--innobase/lock/lock0lock.c183
1 files changed, 5 insertions, 178 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index df5f45e3452..dd033b037ad 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -343,179 +343,6 @@ lock_deadlock_recursive(
#define lock_mutex_enter_kernel() mutex_enter(&kernel_mutex)
#define lock_mutex_exit_kernel() mutex_exit(&kernel_mutex)
-#ifdef notdefined
-/*************************************************************************
-Reserves the kernel mutex. This function is used in this module to allow
-monitoring the contention degree on the kernel mutex caused by the lock
-operations. */
-UNIV_INLINE
-void
-lock_mutex_enter_kernel(void)
-/*=========================*/
-{
- mutex_enter(&kernel_mutex);
-}
-
-/*************************************************************************
-Releases the kernel mutex. This function is used in this module to allow
-monitoring the contention degree on the kernel mutex caused by the lock
-operations. */
-UNIV_INLINE
-void
-lock_mutex_exit_kernel(void)
-/*=========================*/
-{
- mutex_exit(&kernel_mutex);
-}
-#endif
-
-#ifdef notdefined
-
-/*************************************************************************
-Gets the mutex protecting record locks for a page in the buffer pool. */
-UNIV_INLINE
-mutex_t*
-lock_rec_get_mutex(
-/*===============*/
- byte* ptr) /* in: pointer to somewhere within a buffer frame */
-{
- return(buf_frame_get_lock_mutex(ptr));
-}
-
-/*************************************************************************
-Reserves the mutex protecting record locks for a page in the buffer pool. */
-UNIV_INLINE
-void
-lock_rec_mutex_enter(
-/*=================*/
- byte* ptr) /* in: pointer to somewhere within a buffer frame */
-{
- mutex_enter(lock_rec_get_mutex(ptr));
-}
-
-/*************************************************************************
-Releases the mutex protecting record locks for a page in the buffer pool. */
-UNIV_INLINE
-void
-lock_rec_mutex_exit(
-/*================*/
- byte* ptr) /* in: pointer to somewhere within a buffer frame */
-{
- mutex_exit(lock_rec_get_mutex(ptr));
-}
-
-/*************************************************************************
-Checks if the caller owns the mutex to record locks of a page. Works only in
-the debug version. */
-UNIV_INLINE
-ibool
-lock_rec_mutex_own(
-/*===============*/
- /* out: TRUE if the current OS thread has reserved the
- mutex */
- byte* ptr) /* in: pointer to somewhere within a buffer frame */
-{
- return(mutex_own(lock_rec_get_mutex(ptr)));
-}
-
-/*************************************************************************
-Gets the mutex protecting record locks on a given page address. */
-
-mutex_t*
-lock_rec_get_mutex_for_addr(
-/*========================*/
- ulint space, /* in: space id */
- ulint page_no)/* in: page number */
-{
- return(hash_get_mutex(lock_sys->rec_hash,
- lock_rec_fold(space, page_no)));
-}
-
-/*************************************************************************
-Checks if the caller owns the mutex to record locks of a page. Works only in
-the debug version. */
-UNIV_INLINE
-ibool
-lock_rec_mutex_own_addr(
-/*====================*/
- ulint space, /* in: space id */
- ulint page_no)/* in: page number */
-{
- return(mutex_own(lock_rec_get_mutex_for_addr(space, page_no)));
-}
-
-/*************************************************************************
-Reserves all the mutexes protecting record locks. */
-UNIV_INLINE
-void
-lock_rec_mutex_enter_all(void)
-/*==========================*/
-{
- hash_table_t* table;
- ulint n_mutexes;
- ulint i;
-
- table = lock_sys->rec_hash;
-
- n_mutexes = table->n_mutexes;
-
- for (i = 0; i < n_mutexes; i++) {
-
- mutex_enter(hash_get_nth_mutex(table, i));
- }
-}
-
-/*************************************************************************
-Releases all the mutexes protecting record locks. */
-UNIV_INLINE
-void
-lock_rec_mutex_exit_all(void)
-/*=========================*/
-{
- hash_table_t* table;
- ulint n_mutexes;
- ulint i;
-
- table = lock_sys->rec_hash;
-
- n_mutexes = table->n_mutexes;
-
- for (i = 0; i < n_mutexes; i++) {
-
- mutex_exit(hash_get_nth_mutex(table, i));
- }
-}
-
-/*************************************************************************
-Checks that the current OS thread owns all the mutexes protecting record
-locks. */
-UNIV_INLINE
-ibool
-lock_rec_mutex_own_all(void)
-/*========================*/
- /* out: TRUE if owns all */
-{
- hash_table_t* table;
- ulint n_mutexes;
- ibool owns_yes = TRUE;
- ulint i;
-
- table = lock_sys->rec_hash;
-
- n_mutexes = table->n_mutexes;
-
- for (i = 0; i < n_mutexes; i++) {
- if (!mutex_own(hash_get_nth_mutex(table, i))) {
-
- owns_yes = FALSE;
- }
- }
-
- return(owns_yes);
-}
-
-#endif
-
/*************************************************************************
Checks that a transaction id is sensible, i.e., not in the future. */
@@ -2022,7 +1849,7 @@ possible, enqueues a waiting lock request. This is a low-level function
which does NOT look at implicit locks! Checks lock compatibility within
explicit locks. This function sets a normal next-key lock, or in the case
of a page supremum record, a gap type lock. */
-
+static
ulint
lock_rec_lock(
/*==========*/
@@ -2104,7 +1931,7 @@ lock_rec_has_to_wait_in_queue(
/*****************************************************************
Grants a lock to a waiting lock request and releases the waiting
transaction. */
-
+static
void
lock_grant(
/*=======*/
@@ -2171,7 +1998,7 @@ lock_rec_cancel(
Removes a record lock request, waiting or granted, from the queue and
grants locks to other transactions in the queue if they now are entitled
to a lock. NOTE: all record locks contained in in_lock are removed. */
-
+static
void
lock_rec_dequeue_from_page(
/*=======================*/
@@ -2342,7 +2169,7 @@ lock_rec_inherit_to_gap(
Makes a record to inherit the gap locks (except LOCK_INSERT_INTENTION type)
of another record as gap type locks, but does not reset the lock bits of the
other record. Also waiting lock requests are inherited as GRANTED gap locks. */
-
+static
void
lock_rec_inherit_to_gap_if_gap_lock(
/*================================*/
@@ -3582,7 +3409,7 @@ lock_table_has_to_wait_in_queue(
Removes a table lock request, waiting or granted, from the queue and grants
locks to other transactions in the queue, if they now are entitled to a
lock. */
-
+static
void
lock_table_dequeue(
/*===============*/