Back to home page

Enduro/X

 
 

    


0001 TPSVRDONE(3)
0002 ============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpsvrdone - Template server done function signature
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 void tpsvrdone(void);
0016 
0017 
0018 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0019 
0020 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0021 
0022 DESCRIPTION
0023 -----------
0024 This is XATMI server un-initialization function. It is called when Enduro/X 
0025 application server is being shutdown or when process is being shutdown 
0026 separately by *xadmin stop*. Depending on the version for which *atmisrv* 
0027 library XATMI server is being linked, the form of function that should be 
0028 exported by application changes.
0029 
0030 1. If server binary is linked with '-latmisrv', then server must contain 
0031 public (non static) function of *tpsvrdone()*.
0032 
0033 2. If server binary is linked with '-latmisrvnomain', then above (1) rule still 
0034 applies. But in this case the caller's *main()* must invoke *ndrx_main()* function.
0035 
0036 3. If server binary is linked with '-latmisrvinteg', then functions *tpsvrinit()* 
0037 and tpsvrdone()* must be passed to *ndrx_main_integra()* function.
0038 Or if starting server by *_tmstartserver()* - built by *buildserver(8)*, 
0039 function must pointer must be present in 'tmsvrargs_t'.
0040 
0041 During the execution of *tpsvrdone()* the library is still initialized and is 
0042 valid for doing XATMI calls. Normally with this function, then user code 
0043 shall close any XA resource managers open with *tpopen()*
0044 
0045 Library 'atmisrvinteg' provides built in version of *tpsvrdone()* function. Function
0046 may be used only if starting server with *_tmstartserver(3)* (or was built by
0047 *buildserver(8)*). The default *tpsvrdone()* function, in case if application was
0048 not built for multi-threading (extern variable '_tmbuilt_with_thread_option' set to 0 
0049 or buildserver '-t' not set), 
0050 calls *tpsvrthrdone(3)* from the 'tmsvrargs_t'.
0051 In case there were no *tpsvrthrdone(3)* provided, the default *tpsvrthrdone()* is
0052 used also from 'atmisrvinteg' library. The default version of *tpsvrthrdone(3)* calls
0053 *tx_close(3)*.
0054 
0055 This only applies to XATMI servers.
0056 
0057 In case if using C++ compiler, function must be defined without name mangling,
0058 thus extern "C" prefix shall be used.
0059 
0060 RETURN VALUE
0061 ------------
0062 Not available as function is void.
0063 
0064 ERRORS
0065 ------
0066 Not available.
0067 
0068 
0069 EXAMPLE
0070 -------
0071 See *atmitest/test001_basiccall/atmisv1.c* for sample code.
0072 
0073 BUGS
0074 ----
0075 Report bugs to support@mavimax.com
0076 
0077 SEE ALSO
0078 --------
0079 *ndrx_main(3)* *ndrx_main_integra(3)* *tpsvrinit(3)* *tpclose(3)* *tpopen(3)* *xadmin(8)*
0080 
0081 COPYING
0082 -------
0083 (C) Mavimax, Ltd
0084