Drizzled Public API Documentation

lock0types.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; version 2 of the License.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT
00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with
00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
00015 St, Fifth Floor, Boston, MA 02110-1301 USA
00016 
00017 *****************************************************************************/
00018 
00019 /**************************************************/
00026 #pragma once
00027 #ifndef lock0types_h
00028 #define lock0types_h
00029 
00030 #define lock_t ib_lock_t
00031 typedef struct lock_struct  lock_t;
00032 typedef struct lock_sys_struct  lock_sys_t;
00033 
00034 /* Basic lock modes */
00035 enum lock_mode {
00036   LOCK_IS = 0,  /* intention shared */
00037   LOCK_IX,  /* intention exclusive */
00038   LOCK_S,   /* shared */
00039   LOCK_X,   /* exclusive */
00040   LOCK_AUTO_INC,  /* locks the auto-inc counter of a table
00041       in an exclusive mode */
00042   LOCK_NONE,  /* this is used elsewhere to note consistent read */
00043   LOCK_NUM = LOCK_NONE/* number of lock modes */
00044 };
00045 
00046 #endif