AF_LOCK(3) - Linux man page online | Library functions
Mechanism for reserving update rights in AtFS.
Fri Jun 25 14:33:11 1993
af_lock(3) Attribute Filesystem (AtFS) af_lock(3)
AtFS-1.71 Fri Jun 25 14:33:11 1993 af_lock(3)
NAMEaf_lock, af_unlock, af_testlock - mechanism for reserving update rights in AtFS
SYNOPSIS#include <atfs.h> Af_user *af_lock (Af_key *aso, Af_user *locker) Af_user *af_unlock (Af_key *aso) Af_user *af_testlock (Af_key *aso)
DESCRIPTIONThis manual page describes the interface to the AtFS locking mechanism. Locks are used to avoid conflicting updates to one object history. After a user has reserved the update rights, no other user may add new versions to the reserved history. Reserving the update rights happens by locking the most recent version of the history. As AtFS allows adding new versions to each generation in a history, each generation may be locked separately. Reserving update rights for old generations (with generation numbers smaller than the new‐ est generation) are performed by locking the most recent version of the corresponding gen‐ eration. Removing an ASO (af_rm - manual page af_files(3)) and changing an ASO's version number (af_svnum - manual page af_version(3)) also requires a lock on the corresponding ASO. af_lock reserves the update permission for the user identified by locker. On successful completion, a buffer identical to locker is returned, a NULL pointer otherwise. af_unlock cancels a formerly established reservation of update rights. Only the owner or the locker of an ASO (identified by the Af_user structure that was given to the corre‐ sponding call of af_lock) are allowed to do this. On successful completion, af_unlock returns a buffer containing the identification of the former locker. This may be empty, if the ASO was not locked. Upon error, a NULL pointer is returned. af_testlock returns a buffer containing an identification of the current locker of the specified ASO. It returns an empty buffer, if no lock is set.
SEE ALSOaf_version(3), af_files(3)
DIAGNOSTICSaf_lock and af_unlock return -1 on error and af_errno is set to indicate the error number.
|This manual||Reference||Other manuals|
|af_lock(3)||referred by||af_files(3) | af_intro(3) | af_note(3) | af_version(3) | atlog(3)|
|refer to||af_files(3) | af_version(3)|