tpisautobuf — Test is XATMI buffer an automatically allocated
#include <atmi.h>
int tpisautobuf (char *buf);
For XATMI client link with -latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm
For XATMI server link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Test the buffer for marking of automatically allocated by Enduro/X. Such buffers are made at point when they are passed to XATMI service routine by Enduro/X XATMI sub-system. In case if buffer is automatically allocated, return value will be 1, in case if allocated by user’s tpalloc(3) function will return 0. In case of failure -1 is returned. Function can be called by XATMI client, normally client processes allocates buffers are manually, but there could be one exception when multi-threaded XATMI server’s main thread passed service call object to it’s companion XATMI client thread by using tpsrvgetctxdata(3) and tpsrvsetctxdata(3). In that case client process can get auto-buffer.
If buffer is auto-allocated, tpisautobuf() return 1; If manually by tpalloc(3) 0 is returned; in case of error, -1 is returned, with tperrno set to indicate the error.