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_vec |
![]() ![]() |
#include <db.h>int lock_vec(DB_ENV *env, u_int32_t locker, u_int32_t flags, DB_LOCKREQ list[], int nlist, DB_LOCKREQ **elistp);
The lock_vec function atomically obtains and releases one or more locks from the lock table. The lock_vec function is intended to support acquisition or trading of multiple locks under one lock table semaphore, as is needed for lock coupling or in multigranularity locking for lock escalation.
The locker argument specified to lock_vec is an unsigned 32-bit integer quantity. It represents the entity requesting or releasing the locks.
The flags value must be set to 0 or the following value:
The list array provided to lock_vec is typedef'd as DB_LOCKREQ. A DB_LOCKREQ structure has at least the following fields. In order to ensure compatibility with future releases of Berkeley DB, all fields of the DB_LOCKREQ structure that are not explicitly set should be initialized to 0 before the first time the structure is used. Do this by declaring the structure external or static, or by calling memset(3).
See DB_ENV->set_lk_conflicts and Standard Lock Modes for more information on the lock conflict matrix.
The nlist argument specifies the number of elements in the list array.
If any of the requested locks cannot be acquired, or any of the locks to be released cannot be released, the operations before the failing operation are guaranteed to have completed successfully, and lock_vec returns a non-zero value. In addition, if elistp is not NULL, it is set to point to the DB_LOCKREQ entry that was being processed when the error occurred.
If a lock is requested that cannot be immediately granted, and the flags parameter was set to DB_LOCK_NOWAIT, the lock_vec function may return DB_LOCK_NOTGRANTED. In this case, if non-NULL, elistp identifies the request that was not granted.
Otherwise, the lock_vec function returns a non-zero error value on failure and 0 on success.
The lock_vec function may fail and return a non-zero error for the following conditions:
The lock_vec 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_vec 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_vec function atomically obtains and releases one or more locks from the lock table. The DB_ENV->lock_vec function is intended to support d34 1 a34 1
The locker argument specified to DB_ENV->lock_vec is an unsigned d44 1 a44 1
The list array provided to DB_ENV->lock_vec is typedef'd as d55 6 a60 9
Otherwise, the DB_ENV->lock_vec function returns a non-zero error value on failure and 0 on success. d113 1 a113 1
The DB_ENV->lock_vec function may fail and return a non-zero error for the following conditions: d123 2 a124 2
The DB_ENV->lock_vec 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_vec function may fail and return d130 1 d134 5 a138 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, d140 1 a140 1 DB_ENV->lock_vec. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d29 2 a30 2
The DB_ENV->lock_vec method atomically obtains and releases one or more locks from the lock table. The DB_ENV->lock_vec method is intended to support d40 3 a42 5
Otherwise, the DB_ENV->lock_vec method returns a non-zero error value on failure and 0 on success. d123 1 a123 1
The DB_ENV->lock_vec method may fail and return a non-zero error for the following conditions: d133 4 a136 6
The DB_ENV->lock_vec 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_vec 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_vec function atomically obtains and releases one or more locks from the lock table. The DB_ENV->lock_vec function is intended to support d41 5 a45 3
If a lock is requested that cannot be immediately granted, and the flags parameter was set to DB_LOCK_NOWAIT, the DB_ENV->lock_vec function may return DB_LOCK_NOTGRANTED. In this case, if non-NULL, elistp identifies the request that was not granted.
Otherwise, the DB_ENV->lock_vec function returns a non-zero error value on failure and 0 on success. d121 1 a121 1
The DB_ENV->lock_vec function may fail and return a non-zero error for the following conditions: d131 6 a136 4
The DB_ENV->lock_vec 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_vec function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d138 1 a138 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 d29 2 a30 2
The DB_ENV->lock_vec method atomically obtains and releases one or more locks from the lock table. The DB_ENV->lock_vec method is intended to support d40 3 a42 5
Otherwise, the DB_ENV->lock_vec method returns a non-zero error value on failure and 0 on success. d123 1 a123 1
The DB_ENV->lock_vec method may fail and return a non-zero error for the following conditions: d133 4 a136 6
The DB_ENV->lock_vec 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_vec method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.