zAbortXaction

Aborts a transaction.

Service:File System Services (64-Bit)

Syntax

#include <zPublics.h>

STATUS zAbortXaction(
   Key_t   key,
   Xid_t   xid);

Parameters

key

(IN) Specifies the owner of the transaction being aborted. Although any key derived from the same root key can be used for this function, it is easier to maintain the code if you reuse the same key.

xid

(IN) Specifies whether to abort this transaction. Any operations that were bound to this transaction are undone and the resources are returned to a state as if these operations had never been done. Changes made to the system that are not bound to the transaction are not affected.

Return Values

zOK

The operation completed successfully.

non-0

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

Remarks

Aborting a transaction puts the system back into an equivalent state that existed before the transaction began. Even if this transaction is the child of a nested transaction, all locks held by the transaction are released.

See Also

zBeginXaction, zCommitXaction, zLockByteRange, zPrepareToCommitXaction, zUnlockByteRange