zUnlockByteRange

Unlocks a byte range for the specified open file object.

Service:File System Services (64-Bit)
Version:OES 2

Syntax

#include <zPublics.h>

STATUS zUnlockByteRange(
   Key_t   key,
   Xid_t   xid,
   QUAD    startingOffset,
   QUAD    length);

Parameters

key

(IN) Specifies the file (as returned by zOpen or zCreate) whose byte range is being unlocked.

xid

(IN) Is currently not implemented. Pass zNILXID.

startingOffset

(IN) Specifies the logical byte offset in the file where the lock begins.

length

(IN) Specifies the length (in bytes) of the lock to be released. The xid, startingOffset, and length must match to release the lock.

Return Values

zOK

The operation completed successfully.

non-0

An error occurred (see Section 4.1, Return Values for a description).

Remarks

Only locks not bound to a transaction can be unlocked by calling zUnlockByteRange, which prevents dirty reads and rereads for transactions.

See Also

zLockByteRange, zOpen, zWrite