tpsvrdone — Template server done function signature
#include <atmi.h>
void tpsvrdone(void);
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
This is XATMI server un-initialization function. It is called when Enduro/X application server is being shutdown or when process is being shutdown separately by xadmin stop. Depending on the version for which atmisrv library XATMI server is being linked, the form of function that should be exported by application changes.
During the execution of tpsvrdone() the library is still initialized and is valid for doing XATMI calls. Normally with this function, then user code shall close any XA resource managers open with tpopen()
Library atmisrvinteg provides built in version of tpsvrdone() function. Function may be used only if starting server with _tmstartserver(3) (or was built by buildserver(8)). The default tpsvrdone() function, in case if application was not built for multi-threading (extern variable _tmbuilt_with_thread_option set to 0 or buildserver -t not set), calls tpsvrthrdone(3) from the tmsvrargs_t. In case there were no tpsvrthrdone(3) provided, the default tpsvrthrdone() is used also from atmisrvinteg library. The default version of tpsvrthrdone(3) calls tx_close(3).
This only applies to XATMI servers.
In case if using C++ compiler, function must be defined without name mangling, thus extern "C" prefix shall be used.