0001 NDRX_MAIN_INTEGRA(3)
0002 ====================
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 ndrx_main_integra - run the XATMI servers main loop, integration mode
0009
0010
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014
0015 int ndrx_main_integra(int 'argc', char \*\*'argv', int (\*'in_tpsvrinit')(int, char \*\*),
0016 void (*'in_tpsvrdone')(void), long 'flags');
0017
0018 Link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0019
0020 DESCRIPTION
0021 -----------
0022 Function is used in case if Enduro/X XATMI server is linked with
0023 '-latmisrvinteg' library. In this case binarie's *main()* function resists
0024 outside of Enduro/X libs, thus to launch the XATMI server, the
0025 *ndrx_main_integra()* needs to be called. The full 'argc' and 'argv' of
0026 binary's command line must be passed to this function. In integration mode,
0027 callbacks for *tpsvrinit(3)* and *tpsvrdone(3)* must be passed in.
0028
0029 *Valid flags*
0030
0031 *ATMI_SRVLIB_NOLONGJUMP* do not do long jump when *tpreturn(3)* or
0032 *tpforward(3)* returns. This is suitable for systems for which long jump can
0033 crash runtime internals. But not that in this case *tpreturn()* and
0034 *tpforward()* will return as normal function call. Thus programmer shall ensure
0035 that proper logic. It is expected that these are last functions called
0036 in XATMI server's service.
0037
0038 This function is available only for XATMI servers.
0039
0040 RETURN VALUE
0041 ------------
0042 On success, *ndrx_main_integra()* return zero; on error, -1 is returned,
0043 with *tperrno* set to indicate the error.
0044
0045 ERRORS
0046 ------
0047 Note that *tpstrerror()* for returns generic error message plus custom
0048 message with debug info from last call.
0049
0050 *TPESYSTEM* System failure occurred during serving. See logs i.e. user log,
0051 or debugs for more info.
0052
0053 *TPEOS* System failure occurred during serving. See logs i.e. user log,
0054 or debugs for more info.
0055
0056 Other error might be emitted too.
0057
0058 BUGS
0059 ----
0060 Report bugs to support@mavimax.com
0061
0062 SEE ALSO
0063 --------
0064 *ndrx_main(3)* *_tmstartserver(3)*
0065
0066 COPYING
0067 -------
0068 (C) Mavimax, Ltd
0069