Aborts a transaction.
#include <zPublics.h> STATUS zAbortXaction( Key_t key, Xid_t xid);
(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.
(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.
zOK |
The operation completed successfully. |
non-0 |
An error occurred (see Section 4.1, Return Values for a description). |
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.