mariadb/include/lock0priv.ic
vasil ccd409b569 lock_get_type() needs to be accessed outside of the lock module, but it
is inline and accesses lock_t members.

As advised by Marko rename lock_get_type() to lock_get_type_low() and
create a public non-inline function lock_get_type() which calls
lock_get_type_low().

Approved by:	Marko
2007-09-04 07:54:29 +00:00

32 lines
839 B
C

/******************************************************
Lock module internal inline methods.
(c) 2007 Innobase Oy
Created July 16, 2007 Vasil Dimov
*******************************************************/
/* This file contains only methods which are used in
lock/lock0* files, other than lock/lock0lock.c.
I.e. lock/lock0lock.c contains more internal inline
methods but they are used only in that file. */
#ifndef LOCK_MODULE_IMPLEMENTATION
#error Do not include lock0priv.ic outside of the lock/ module
#endif
/*************************************************************************
Gets the type of a lock. */
UNIV_INLINE
ulint
lock_get_type_low(
/*==============*/
/* out: LOCK_TABLE or LOCK_REC */
const lock_t* lock) /* in: lock */
{
ut_ad(lock);
return(lock->type_mode & LOCK_TYPE_MASK);
}
/* vim: set filetype=c: */