head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.52.55; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.08; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.48.57; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.07.59; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.56; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
lock_get |
![]() ![]() |
#include <db.h>int lock_get(DB_ENV *env, u_int32_t locker, u_int32_t flags, const DBT *obj, const db_lockmode_t lock_mode, DB_LOCK *lock);
The lock_get function acquires a lock from the lock table, returning information about it in the lock argument.
The locker argument specified to lock_get is an unsigned 32-bit integer quantity. It represents the entity requesting or releasing the lock.
The flags value must be set to 0 or the following value:
The obj argument is an untyped byte string that specifies the object to be locked or released. Applications using the locking subsystem directly while also doing locking via the Berkeley DB access methods must take care not to inadvertently lock objects that happen to be equal to the unique file IDs used to lock files. See Access method locking conventions for more information.
The mode argument is used as an index into the environment's lock conflict matrix. When using the default lock conflict matrix, mode must be set to one of the following values:
See DB_ENV->set_lk_conflicts and Standard Lock Modes for more information on the lock conflict matrix.
If a lock is requested that cannot be immediately granted, and the flags parameter was set to DB_LOCK_NOWAIT, the lock_get function may return DB_LOCK_NOTGRANTED.
Otherwise, the lock_get function returns a non-zero error value on failure and 0 on success.
The lock_get function may fail and return a non-zero error for the following conditions:
The lock_get function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the lock_get function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
![]() ![]() |
Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @d1 1 a1 1 @ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 1 a1 1 d6 1 a6 1
The DB_ENV->lock_get function acquires a lock from the lock table, returning d33 1 a33 1
The locker argument specified to DB_ENV->lock_get is an unsigned d63 1 a63 1 DB_ENV->lock_get function may d66 1 a66 1
Otherwise, the DB_ENV->lock_get function returns a non-zero error value on failure and 0 on success. d68 1 a68 1
The DB_ENV->lock_get function may fail and return a non-zero error for the following conditions: d78 2 a79 2
The DB_ENV->lock_get function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->lock_get function may fail and return d85 1 d89 5 a93 6 DB_ENV->lock_detect, DB_ENV->lock_get, DB_ENV->lock_id, DB_ENV->lock_id_free, DB_ENV->lock_put, DB_ENV->lock_stat, d95 1 a95 1 DB_ENV->lock_vec. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d30 1 a30 1
The DB_ENV->lock_get method acquires a lock from the lock table, returning d40 2 a41 3 existing lock, return DB_LOCK_NOTGRANTED immediately instead of waiting for the lock to become available. d61 6 a66 2
Otherwise, the DB_ENV->lock_get method returns a non-zero error value on failure and 0 on success. d68 1 a68 1
The DB_ENV->lock_get method may fail and return a non-zero error for the following conditions: d78 4 a81 6
The DB_ENV->lock_get method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->lock_get method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
The DB_ENV->lock_get function acquires a lock from the lock table, returning d41 3 a43 2 existing lock, return immediately instead of waiting for the lock to become available. d63 2 a64 6
If a lock is requested that cannot be immediately granted, and the flags parameter was set to DB_LOCK_NOWAIT, the DB_ENV->lock_get function may return DB_LOCK_NOTGRANTED.
Otherwise, the DB_ENV->lock_get function returns a non-zero error value on failure and 0 on success. d66 1 a66 1
The DB_ENV->lock_get function may fail and return a non-zero error for the following conditions: d76 6 a81 4
The DB_ENV->lock_get function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->lock_get function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d83 1 a83 13 DB_ENV->set_lk_conflicts, DB_ENV->set_lk_detect, DB_ENV->set_lk_max_lockers, DB_ENV->set_lk_max_locks, DB_ENV->set_lk_max_objects, DB_ENV->lock_detect, DB_ENV->lock_get, DB_ENV->lock_id, DB_ENV->lock_id_free, DB_ENV->lock_put, DB_ENV->lock_stat, and DB_ENV->lock_vec. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d30 1 a30 1
The DB_ENV->lock_get method acquires a lock from the lock table, returning d40 2 a41 3 existing lock, return DB_LOCK_NOTGRANTED immediately instead of waiting for the lock to become available. d61 6 a66 2
Otherwise, the DB_ENV->lock_get method returns a non-zero error value on failure and 0 on success. d68 1 a68 1
The DB_ENV->lock_get method may fail and return a non-zero error for the following conditions: d78 4 a81 6
The DB_ENV->lock_get method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->lock_get method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.