~percona-dev/percona-innodb-plugin/percona-innodb-1.0

« back to all changes in this revision

Viewing changes to include/lock0priv.ic

  • Committer: Vadim Tkachenko
  • Date: 2008-12-01 02:05:57 UTC
  • Revision ID: vadim@percona.com-20081201020557-p7k2m94mjtdg1a83
New rw-locks

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
Lock module internal inline methods.
 
3
 
 
4
(c) 2007 Innobase Oy
 
5
 
 
6
Created July 16, 2007 Vasil Dimov
 
7
*******************************************************/
 
8
 
 
9
/* This file contains only methods which are used in
 
10
lock/lock0* files, other than lock/lock0lock.c.
 
11
I.e. lock/lock0lock.c contains more internal inline
 
12
methods but they are used only in that file. */
 
13
 
 
14
#ifndef LOCK_MODULE_IMPLEMENTATION
 
15
#error Do not include lock0priv.ic outside of the lock/ module
 
16
#endif
 
17
 
 
18
/*************************************************************************
 
19
Gets the type of a lock. */
 
20
UNIV_INLINE
 
21
ulint
 
22
lock_get_type_low(
 
23
/*==============*/
 
24
                                /* out: LOCK_TABLE or LOCK_REC */
 
25
        const lock_t*   lock)   /* in: lock */
 
26
{
 
27
        ut_ad(lock);
 
28
 
 
29
        return(lock->type_mode & LOCK_TYPE_MASK);
 
30
}
 
31
 
 
32
/* vim: set filetype=c: */