tx_set_transaction_control
-set transaction_control
characteristic
#include <tx.h>
int tx_set_transaction_control(TRANSACTION_CONTROL control)
tx_set_transaction_control
() sets the transaction_control
characteristic to the value specified in control
. This characteristic determines whether tx_commit
(3) and tx_rollback
(3) start a new transaction before returning to their caller. tx_set_transaction_control
() may be called regardless of whether the application program is in transaction mode. This setting remains in effect until changed by a subsequent call to tx_set_transaction_control
().
The initial setting for this characteristic is TX_UNCHAINED
.
Following are the valid settings for control
.
TX_UNCHAINED
tx_commit
(3) and tx_rollback
(3) should not start a new transaction before returning to their caller. The caller must issue tx_begin
(3) to start a new transaction.
TX_CHAINED
tx_commit
(3) and tx_rollback
(3) should start a new transaction before returning to their caller.
Upon successful completion, tx_set_transaction_control
() returns TX_OK
, a non-negative return value.
Under the following conditions, tx_set_transaction_control
() does not change the setting of the transaction_control
characteristic and returns one of these negative values:
TX_EINVAL
]
control
is not one of TX_UNCHAINED
or TX_CHAINED
.
TX_PROTOCOL_ERROR
]
tx_open
(3)).
TX_FAIL
]
tx_begin
(3), tx_commit
(3), tx_open
(3), tx_rollback
(3), tx_info
(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.