.I=Berkeley DB Reference Guide: Locking Subsystem[P7

Berkeley DB Reference Guide: Locking Subsystem



)

Standard lock modes



HThe Berkeley DB include files declare two commonly used conflict arrays:

y

const u_int8_t db_lock_rw_conflicts[ ];
This is a conflict array for a simple scheme using shared and exclusive lock modes.z

const u_int8_t db_lock_riw_conflicts[ ];
This is a conflict array that involves various intent lock modes (e.g.,:intent shared) that are used for multigranularity locking.


:Their associated sizes are DB_LOCK_RW_N and DB_LOCK_RIW_N.

:In addition, the Berkeley DB include file defines the type3db_lockmode_t, which is the type of the lock*modes used with the standard tables above:

+

DB_LOCK_NG
not granted (always 0)$

DB_LOCK_READ
read (shared))

DB_LOCK_WRITE
write (exclusive)
Aÿÿ