drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
lock0types.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
26#pragma once
27#ifndef lock0types_h
28#define lock0types_h
29
30#define lock_t ib_lock_t
31typedef struct lock_struct lock_t;
32typedef struct lock_sys_struct lock_sys_t;
33
34/* Basic lock modes */
35enum lock_mode {
36 LOCK_IS = 0, /* intention shared */
37 LOCK_IX, /* intention exclusive */
38 LOCK_S, /* shared */
39 LOCK_X, /* exclusive */
40 LOCK_AUTO_INC, /* locks the auto-inc counter of a table
41 in an exclusive mode */
42 LOCK_NONE, /* this is used elsewhere to note consistent read */
43 LOCK_NUM = LOCK_NONE/* number of lock modes */
44};
45
46#endif