tx_commit
-commit a global transaction
#include <tx.h>
int tx_commit(void)
tx_commit
() is used to commit the work of the transaction active in the caller's thread of control.
If the transaction_control
characteristic (see tx_set_transaction_control
(3)) is TX_UNCHAINED
, then when tx_commit
() returns, the caller is no longer in transaction mode. However, if the transaction_control
characteristic is TX_CHAINED
, then when tx_commit
() returns, the caller remains in transaction mode on behalf of a new transaction (see the RETURN VALUE and ERRORS sections below).
tx_set_commit_return
(3)
Upon successful completion, Under the following conditions, Return Value
tx_commit
() returns TX_OK
, a non-negative return value.
Errors
tx_commit
() fails and returns one of these negative values:
TX_NO_BEGIN
]
transaction_control
characteristic is TX_CHAINED
.
TX_ROLLBACK
]
transaction_control
characteristic is TX_CHAINED
, a new transaction is started.
TX_ROLLBACK_NO_BEGIN
]
transaction_control
characteristic is TX_CHAINED
.
TX_MIXED
]
transaction_control
characteristic is TX_CHAINED
, a new transaction is started.
TX_MIXED_NO_BEGIN
]
transaction_control
characteristic is TX_CHAINED
.
TX_HAZARD
]
transaction_control
characteristic is TX_CHAINED
, a new transaction is started.
TX_HAZARD_NO_BEGIN
]
transaction_control
characteristic is TX_CHAINED
.
TX_PROTOCOL_ERROR
]
TX_FAIL
]
tx_begin
(3), tx_set_commit_return
(3), tx_set_transaction_control
(3), tx_set_transaction_timeout
(3)
Both the X/Open TX interface and the X-Windows system defines the type XID. It is not possible to use both X-Windows calls and TX calls in the same file.