1 /***************************************************************************** 2 3 Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License, version 2.0, 7 as published by the Free Software Foundation. 8 9 This program is also distributed with certain software (including 10 but not limited to OpenSSL) that is licensed under separate terms, 11 as designated in a particular file or component or in included license 12 documentation. The authors of MySQL hereby grant you an additional 13 permission to link the program and your derivative works with the 14 separately licensed software that they have included with MySQL. 15 16 This program is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License, version 2.0, for more details. 20 21 You should have received a copy of the GNU General Public License along with 22 this program; if not, write to the Free Software Foundation, Inc., 23 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA 24 25 *****************************************************************************/ 26 27 /**************************************************//** 28 @file include/lock0types.h 29 The transaction lock system global types 30 31 Created 5/7/1996 Heikki Tuuri 32 *******************************************************/ 33 34 #ifndef lock0types_h 35 #define lock0types_h 36 37 #define lock_t ib_lock_t 38 struct lock_t; 39 struct lock_sys_t; 40 41 /* Basic lock modes */ 42 enum lock_mode { 43 LOCK_IS = 0, /* intention shared */ 44 LOCK_IX, /* intention exclusive */ 45 LOCK_S, /* shared */ 46 LOCK_X, /* exclusive */ 47 LOCK_AUTO_INC, /* locks the auto-inc counter of a table 48 in an exclusive mode */ 49 LOCK_NONE, /* this is used elsewhere to note consistent read */ 50 LOCK_NUM = LOCK_NONE, /* number of lock modes */ 51 LOCK_NONE_UNSET = 255 52 }; 53 54 55 #endif 56