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