tpfreectxt — Free the context data (TLS data)
#include <atmi.h>
void tpfreectxt(TPCONTEXT_T context);
Link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Function frees up the context data which was returned by tpgetctxt(3) function call. Function does not do the tpterm(3). Thus to remove context data fully, firstly thread running with context must call tpterm(3), then tpgetctxt(3) and then call tpfreectxt().
This function uses underlaying thread local storage infrastructure which is provided separately for each of the major Enduro/X libraries - libnstd (Standard library), libufb (UBF buffer library) and libatmi (ATMI library). If operations at library levels are required, then following functions can be used:
Function call run in NULL context. If current TLS context equals to context then current thread is set to NULL context.