tpnewctxt − Allocate new XATMI Context
#include <atmi.h>
TPCONTEXT_T tpnewctxt(int auto_destroy, int auto_set)
Link with −latmi −lubf −lnstd −lpthread −lrt −lm −ldl
Function allocates new XATMI context. This includes allocation of standard library TLS (NSTD), UBF library TLS (UBF) and ATMI library TLS. All is stored in object to which return value (TPCONTEXT_T type) points to.
The flag auto_destroy if set to 1, will make the allocated context to be automatically destroyed when thread exits (if at exit point of time this context was associated with it). To disable this functionality, set value to 0.
if auto_set flag is set to 1, current thread is automatically associated with newly allocated context. To disable this functionality, use value 0.
On success, tpnewctxt() return pointer to newly allocate ATMI context object; on error, NULL is returned. Additional infos might be found in ULOG.
N/A
See atmitest/test032_oapi/atmiclt32.c for sample code.
Report bugs to support@mavimax.com
tpsetctxt(3) tpfreectxt(3) tpnewctxt(3)
© Mavimax, Ltd