Back to home page

Enduro/X

 
 

    


0001 TPSBLKTIME(3)
0002 =============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpsblktime - Set timeout configuration for ATMI library
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpsblktime(int 'tout', 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 Configure timeout for any XATMI IPC calls. This affect the sending and receiving parts of the IPC.
0024 This functions allows to control timeout settings on per thread context basis. 
0025 The 'tout' is specified in seconds. Note that for *SystemV* poller, precision is 
0026 configured with *NDRX_SCANUNIT* setting. For all other pollers (e.g. *epoll*, *svapoll*), precision
0027 is as provided by operating system for timed system calls (normally expected in milliseconds).
0028 
0029 'tout' value must be non negative number. Value *0* cancels particular setting. When XATMI IPC is
0030 performed, the timeout value used is resolved in the following order:
0031 
0032 1. Use tpsblktime() + *TPBLK_NEXT*, if applies for the given API and is set.
0033 
0034 2. Use tpsblktime() + *TPBLK_ALL*, if set.
0035 
0036 3. Use *tptoutset(3)* setting (process wide), if set.
0037 
0038 4. Use *NDRX_OUT* setting (process wide), from environment configuration.
0039 
0040 Per process timeout configuration may be applied with *tptoutset(3)* Enduro/X call.
0041 
0042 *Valid flags*
0043 
0044 *TPBLK_ALL* apply timeout setting for any XATMI call, applied for current XATMI context associated
0045 with the current thread.
0046 
0047 *TPBLK_NEXT* apply timeout setting for certain XATMI API calls (see list bellow). After the API
0048 call value is canceled. Note that these APIs cancels the setting, even if API call did fail (e.g.
0049 invalid arguments).
0050 
0051 TPBLK_NEXT supported APIs
0052 -------------------------
0053 
0054 Following APIs processes the *TPBLK_NEXT*: 
0055 
0056 . *tpcall(3)* - setting applies to sending and receiving part.
0057 
0058 . *tpacall(3)* - applies to sending part.
0059 
0060 . *tpgetrply(3)* - applies to receiving part.
0061 
0062 
0063 *Note:* APIs not listed above, does not process *TPBLK_NEXT* and does not cancel it.
0064 
0065 
0066 RETURN VALUE
0067 ------------
0068 On success, *tpsblktime()* return zero; on error, -1 is returned, with 
0069 *tperrno* set to indicate the error.
0070 
0071 ERRORS
0072 ------
0073 Note that *tpstrerror()* returns generic error message plus custom message with 
0074 debug info from last function call.
0075 
0076 *TPEINVAL* 'tout' parameter is negative number. 'flags' is not *TPBLK_ALL* or *TPBLK_NEXT*.
0077 
0078 
0079 EXAMPLE
0080 -------
0081 See *atmitest/test051_settout/atmiclt51_blk.c* for sample code.
0082     
0083 BUGS
0084 ----
0085 Report bugs to support@mavimax.com
0086 
0087 SEE ALSO
0088 --------
0089 *tpgblktime(3)* *tptoutget(3)* *ex_env(5)*
0090 
0091 COPYING
0092 -------
0093 (C) Mavimax, Ltd
0094