xref: /titanic_41/usr/src/cmd/sendmail/db/lock/lock_conflict.c (revision 7c2fbfb345896881c631598ee3852ce9ce33fb07)
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 1996, 1997, 1998
5  *	Sleepycat Software.  All rights reserved.
6  */
7 
8 #include "config.h"
9 
10 #ifndef lint
11 static const char sccsid[] = "@(#)lock_conflict.c	10.4 (Sleepycat) 11/20/98";
12 #endif /* not lint */
13 
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
16 #endif
17 
18 #include "db_int.h"
19 
20 /*
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.
23  */
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
29 };
30 
31 const u_int8_t db_riw_conflicts[] = {
32 	/*		N   	S   	X  	IX  	IS	SIX */
33 	/*   N */	0,	0,	0,	0,	0,	0,
34 	/*   S */	0,	0,	1,	1,	0,	1,
35 	/*   X */	1,	1,	1,	1,	1,	1,
36 	/*  IX */	0,	1,	1,	0,	0,	0,
37 	/*  IS */	0,	0,	1,	0,	0,	0,
38 	/* SIX */	0,	1,	1,	0,	0,	0
39 };
40