(I#Berkeley DB: lock_id[P

lock_id





#include <db.h>

int(lock_id(DB_LOCKTAB *lt, u_int32_t *idp);





Description



The lock_id functionJcopies a locker ID, which is guaranteed to be unique in the specified lock9table, into the memory location referenced by idp.

MThe Berkeley DB access methods generate a unique locker ID for each file thatPis opened with locking. During Berkeley DB access method operation, this lockerFID will be used for all lock calls unless a transaction identifier wasJspecified for the call, in which case the transaction ID specified is usedas the locker ID.

The lock_idHfunction returns the value of errno on failure, and 0 on success.



Errors

PIf a fatal error occurs in Berkeley DB, the lock_id function may fail and returnFDB_RUNRECOVERY, at which point all subsequent database calls will alsoreturn DB_RUNRECOVERY.

The lock_id)function may fail and return errnoKfor any of the errors specified for the following Berkeley DB and C library functions: abort(3), fcntl(3), fprintf(3),and getpid(3).



See Also

:lock_close,<lock_detect,6lock_get,lock_id,8lock_open,3lock_put,8lock_stat,;lock_unlinkand6lock_vec.
ÿÿ