Update.
[glibc.git] / db2 / lock / lock_conflict.c
blob870aa0dc17ac6bde32c6ee9851caa4ee1ba57591
1 /*-
2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996, 1997, 1998
5 * Sleepycat Software. All rights reserved.
6 */
8 #include "config.h"
10 #ifndef lint
11 static const char sccsid[] = "@(#)lock_conflict.c 10.3 (Sleepycat) 4/10/98";
12 #endif /* not lint */
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
16 #endif
18 #include "db_int.h"
21 * The conflict arrays are set up such that the row is the lock you
22 * are holding and the column is the lock that is desired.
24 const u_int8_t db_rw_conflicts[] = {
25 /* N R W */
26 /* N */ 0, 0, 0,
27 /* R */ 0, 0, 1,
28 /* W */ 0, 1, 1
31 const u_int8_t db_riw_conflicts[] = {
32 /* N S X IS IX SIX */
33 /* N */ 0, 0, 0, 0, 0, 0,
34 /* S */ 0, 0, 1, 0, 1, 1,
35 /* X */ 1, 1, 1, 1, 1, 1,
36 /* IS */ 0, 0, 1, 0, 0, 0,
37 /* IX */ 0, 1, 1, 0, 0, 0,
38 /* SIX */ 0, 1, 1, 0, 0, 0