summaryrefslogtreecommitdiff
path: root/storage/xtradb/include/lock0priv.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2009-11-13 22:26:08 +0100
committerunknown <knielsen@knielsen-hq.org>2009-11-13 22:26:08 +0100
commit898f6f48b79d1f2c334fb559225b2b0fade5ea93 (patch)
tree84df8eecd942b650f172cbd67050ee8984c0d52b /storage/xtradb/include/lock0priv.h
parent275c0a7f96502b33f763fb9388dcc1c289e4792b (diff)
parent2bde0c5e6d31583e5197e3b513f572a693161f62 (diff)
downloadmariadb-git-898f6f48b79d1f2c334fb559225b2b0fade5ea93.tar.gz
Merge XtraDB 8 into MariaDB.
Diffstat (limited to 'storage/xtradb/include/lock0priv.h')
-rw-r--r--storage/xtradb/include/lock0priv.h58
1 files changed, 30 insertions, 28 deletions
diff --git a/storage/xtradb/include/lock0priv.h b/storage/xtradb/include/lock0priv.h
index 0a0d41e6aaa..287c151b19f 100644
--- a/storage/xtradb/include/lock0priv.h
+++ b/storage/xtradb/include/lock0priv.h
@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/
-/******************************************************
+/**************************************************//**
+@file include/lock0priv.h
Lock module internal structures and methods.
Created July 12, 2007 Vasil Dimov
@@ -38,66 +39,67 @@ those functions in lock/ */
#include "trx0types.h"
#include "ut0lst.h"
-/* A table lock */
+/** A table lock */
typedef struct lock_table_struct lock_table_t;
+/** A table lock */
struct lock_table_struct {
- dict_table_t* table; /* database table in dictionary
+ dict_table_t* table; /*!< database table in dictionary
cache */
UT_LIST_NODE_T(lock_t)
- locks; /* list of locks on the same
+ locks; /*!< list of locks on the same
table */
};
-/* Record lock for a page */
+/** Record lock for a page */
typedef struct lock_rec_struct lock_rec_t;
+/** Record lock for a page */
struct lock_rec_struct {
- ulint space; /* space id */
- ulint page_no; /* page number */
- ulint n_bits; /* number of bits in the lock
+ ulint space; /*!< space id */
+ ulint page_no; /*!< page number */
+ ulint n_bits; /*!< number of bits in the lock
bitmap; NOTE: the lock bitmap is
placed immediately after the
lock struct */
};
-/* Lock struct */
+/** Lock struct */
struct lock_struct {
- trx_t* trx; /* transaction owning the
+ trx_t* trx; /*!< transaction owning the
lock */
UT_LIST_NODE_T(lock_t)
- trx_locks; /* list of the locks of the
+ trx_locks; /*!< list of the locks of the
transaction */
- ulint type_mode; /* lock type, mode, LOCK_GAP or
+ ulint type_mode; /*!< lock type, mode, LOCK_GAP or
LOCK_REC_NOT_GAP,
LOCK_INSERT_INTENTION,
wait flag, ORed */
- hash_node_t hash; /* hash chain node for a record
+ hash_node_t hash; /*!< hash chain node for a record
lock */
- dict_index_t* index; /* index for a record lock */
+ dict_index_t* index; /*!< index for a record lock */
union {
- lock_table_t tab_lock;/* table lock */
- lock_rec_t rec_lock;/* record lock */
- } un_member;
+ lock_table_t tab_lock;/*!< table lock */
+ lock_rec_t rec_lock;/*!< record lock */
+ } un_member; /*!< lock details */
};
-/*************************************************************************
-Gets the type of a lock. */
+/*********************************************************************//**
+Gets the type of a lock.
+@return LOCK_TABLE or LOCK_REC */
UNIV_INLINE
ulint
lock_get_type_low(
/*==============*/
- /* out: LOCK_TABLE or LOCK_REC */
- const lock_t* lock); /* in: lock */
-
-/*************************************************************************
-Gets the previous record lock set on a record. */
+ const lock_t* lock); /*!< in: lock */
+/*********************************************************************//**
+Gets the previous record lock set on a record.
+@return previous lock on the same record, NULL if none exists */
+UNIV_INTERN
const lock_t*
lock_rec_get_prev(
/*==============*/
- /* out: previous lock on the same
- record, NULL if none exists */
- const lock_t* in_lock,/* in: record lock */
- ulint heap_no);/* in: heap number of the record */
+ const lock_t* in_lock,/*!< in: record lock */
+ ulint heap_no);/*!< in: heap number of the record */
#ifndef UNIV_NONINL
#include "lock0priv.ic"