Back to home page

Enduro/X

 
 

    


0001 TPSCMT(3)
0002 =========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpscmt - Set commit return mode
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpscmt(long flags);
0016 
0017 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 Change the logic how *tpcommit(3)* shall behave. Setting affects current
0024 transaction and is used during the phase when commit is performed. The setting
0025 value is stored in thread local stored for particular control thread. The value
0026 is shared with tx.h API.
0027 
0028 Parameter 'when_return' accepts following values:
0029 
0030 - *TP_CMT_LOGGED* which indicates that *tx_commit(3)* will return
0031 immediately after all transaction managers participating in transaction have
0032 been prepared for commit. And the actual commit is left for background thread
0033 at transaction manager *tmsrv(8)* server process. The *tmsrv(8)* run these
0034 jobs periodically at *-s* seconds interval, configured at server's command line
0035 parameter.
0036 
0037 - *TP_CMT_COMPLETE* the default value which means that *tpcommit(3)* will
0038 return only after full commit have been performed.
0039 
0040 RETURN VALUE
0041 ------------
0042 On success, *tpscmt()* return either *TP_CMT_LOGGED* or *TP_CMT_COMPLETE* depending
0043 on previous setting. On error, -1 is returned, with *tperrno* set 
0044 to indicate the error.
0045 
0046 ERRORS
0047 ------
0048 Note that *tpstrerror()* returns generic error message plus custom message with 
0049 debug info from last function call.
0050 
0051 *TPEINVAL* Invalid 'flag' value, must be either *TP_CMT_LOGGED* or *TP_CMT_COMPLETE*.
0052 
0053 EXAMPLE
0054 -------
0055 See *atmitest/test021_xafull/atmiclt21tx.c* for sample code.
0056 
0057 BUGS
0058 ----
0059 Report bugs to support@mavimax.com
0060 
0061 SEE ALSO
0062 --------
0063 *tx_set_commit_return(3)* *tpcommit(3)*
0064 
0065 COPYING
0066 -------
0067 (C) Mavimax, Ltd
0068