DB_ENV->lock_vec API Ref

#include <db.h>

int DB_ENV->lock_vec(DB_ENV *env, u_int32_t locker, u_int32_t flags, DB_LOCKREQ list[], int nlist, DB_LOCKREQ **elistp);


Description: DB_ENV->lock_vec

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 acquisition or trading of multiple locks under one lock table semaphore, as is needed for lock coupling or in multigranularity locking for lock escalation.

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 DB_ENV->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.

Unless otherwise specified, the DB_ENV->lock_vec method returns a non-zero error value on failure and 0 on success.

Parameters
elistp flags locker list nlist

Errors

The DB_ENV->lock_vec method may fail and return one of the following non-zero errors:


DB_LOCK_DEADLOCK DB_LOCK_NOTGRANTED

DB_LOCK_NOTGRANTED

EINVAL

ENOMEM


Class DB_ENV, DB_LOCK
See Also Locking Subsystem and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.