You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

  1. /*****************************************************************************
  2. Copyright (c) 2007, 2009, Innobase Oy. All Rights Reserved.
  3. This program is free software; you can redistribute it and/or modify it under
  4. the terms of the GNU General Public License as published by the Free Software
  5. Foundation; version 2 of the License.
  6. This program is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along with
  10. this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  11. Place, Suite 330, Boston, MA 02111-1307 USA
  12. *****************************************************************************/
  13. /**************************************************//**
  14. @file include/lock0priv.ic
  15. Lock module internal inline methods.
  16. Created July 16, 2007 Vasil Dimov
  17. *******************************************************/
  18. /* This file contains only methods which are used in
  19. lock/lock0* files, other than lock/lock0lock.c.
  20. I.e. lock/lock0lock.c contains more internal inline
  21. methods but they are used only in that file. */
  22. #ifndef LOCK_MODULE_IMPLEMENTATION
  23. #error Do not include lock0priv.ic outside of the lock/ module
  24. #endif
  25. /*********************************************************************//**
  26. Gets the type of a lock.
  27. @return LOCK_TABLE or LOCK_REC */
  28. UNIV_INLINE
  29. ulint
  30. lock_get_type_low(
  31. /*==============*/
  32. const lock_t* lock) /*!< in: lock */
  33. {
  34. ut_ad(lock);
  35. return(lock->type_mode & LOCK_TYPE_MASK);
  36. }
  37. /* vim: set filetype=c: */