0001 TPFREECTXT(3)
0002 ============
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 tpfreectxt - Free the context data (TLS data)
0009
0010
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014
0015 void tpfreectxt(TPCONTEXT_T 'context');
0016
0017 Link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0018
0019 DESCRIPTION
0020 -----------
0021 Function frees up the context data which was returned by *tpgetctxt(3)* function
0022 call. Function does not do the *tpterm(3)*. Thus to remove context data fully,
0023 firstly thread running with context must call *tpterm(3)*, then *tpgetctxt(3)*
0024 and then call *tpfreectxt()*.
0025
0026 This function uses underlaying thread local storage infrastructure which is
0027 provided separately for each of the major Enduro/X libraries - libnstd
0028 (Standard library), libufb (UBF buffer library) and libatmi (ATMI library).
0029 If operations at library levels are required, then following functions can be used:
0030
0031 1. ndrx_nstd_tls_new(), ndrx_ubf_tls_new(), ndrx_atmi_tls_new() - allocate TLS
0032 data for library.
0033
0034 2. ndrx_nstd_tls_get(), ndrx_ubf_tls_get(), ndrx_atmi_tls_get() - get the TLS
0035 data for library (currently associated with thread).
0036
0037 3. ndrx_nstd_tls_set(), ndrx_ubf_tls_set(), ndrx_atmi_tls_set() - set the thread
0038 local data from saved pointer.
0039
0040 4. ndrx_nstd_tls_free(), ndrx_ubf_tls_free(), ndrx_atmi_tls_free() - free the
0041 thread local data.
0042
0043
0044 Function call run in NULL context. If current TLS context equals to 'context'
0045 then current thread is set to NULL context.
0046
0047 RETURN VALUE
0048 ------------
0049 N/A
0050
0051 ERRORS
0052 ------
0053 N/A
0054
0055 EXAMPLE
0056 -------
0057 See *atmitest/test016_contextsw/atmiclt16.c* for sample code.
0058
0059 BUGS
0060 ----
0061 Report bugs to support@mavimax.com
0062
0063 SEE ALSO
0064 --------
0065 *tpgetctxt(3)* *tpsetctxt(3)* *tpsrvsetctxdata(3)* *tpsrvgetctxdata(3)*
0066 *tpcontinue(3)* *tpinit(3)*
0067
0068 COPYING
0069 -------
0070 (C) Mavimax, Ltd
0071