Back to home page

Enduro/X

 
 

    


0001 TPISAUTOBUF(3)
0002 ==============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpisautobuf - Test is XATMI buffer an automatically allocated
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpisautobuf (char *'buf');
0016 
0017 
0018 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0019 
0020 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf
0021 -lnstd -lpthread -lrt -lm'
0022 
0023 DESCRIPTION
0024 -----------
0025 Test the buffer for marking of 'automatically allocated' by Enduro/X. Such buffers
0026 are made at point when they are passed to XATMI service routine by Enduro/X XATMI
0027 sub-system. In case if buffer is automatically allocated, return value will be *1*,
0028 in case if allocated by user's *tpalloc(3)* function will return *0*. In case
0029 of failure *-1* is returned. Function can be called by XATMI client, normally
0030 client processes allocates buffers are manually, but there could be
0031 one exception when multi-threaded XATMI server's main thread passed service 
0032 call 'object' to it's companion XATMI client thread by using *tpsrvgetctxdata(3)*
0033 and *tpsrvsetctxdata(3)*. In that case client process can get auto-buffer.
0034 
0035 
0036 RETURN VALUE
0037 ------------
0038 If buffer is auto-allocated, *tpisautobuf()* return 1; If manually by *tpalloc(3)*
0039 0 is returned; in case of error, -1 is returned, with *tperrno* set to indicate the error.
0040 
0041 
0042 ERRORS
0043 ------
0044 Note that *tpstrerror()* returns generic error message plus custom message 
0045 with debug info from last function call.
0046 
0047 *TPEINVAL* Invalid parameter is given to function. Either 'buf' is NULL or 
0048 'buf' not allocated by *tpalloc()*
0049 
0050 
0051 BUGS
0052 ----
0053 Report bugs to support@mavimax.com
0054 
0055 SEE ALSO
0056 --------
0057 *tpalloc(3)* *tpfree(3)* *tpsrvgetctxdata(3)* *tpsrvsetctxdata(3)*
0058 
0059 COPYING
0060 -------
0061 (C) Mavimax, Ltd
0062