Back to home page

Enduro/X

 
 

    


0001 TPEXT_ADDB4POLLCB(3)
0002 ====================
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpext_addb4pollcb - XATMI extension, before poll callback add
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpext_addb4pollcb(int (*'p_b4pollcb')(void));
0016 
0017 Link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 DESCRIPTION
0020 -----------
0021 Function registers callback function which is activated when XATMI server's main loop is going to poll for next message. The 'p_b4pollcb' callback function in case of success shall return 0. If 'p_b4pollcb' returns other value than 0, then XATMI server proceeds with shutdown.
0022 
0023 This function is available only for XATMI servers.
0024 
0025 RETURN VALUE
0026 ------------
0027 On success, *tpext_addb4pollcb()* return zero; on error, -1 is returned, with *tperrno* set to indicate the error.
0028 
0029 ERRORS
0030 ------
0031 Note that *tpstrerror()* returns generic error message plus custom message with debug info from last function call.
0032 
0033 *TPEINVAL* 'p_b4pollcb' paramter is NULL.
0034 
0035 EXAMPLE
0036 -------
0037 See *atmitest/test008_extensions/atmisv.c* for sample code.
0038 
0039 BUGS
0040 ----
0041 Report bugs to support@mavimax.com
0042 
0043 SEE ALSO
0044 --------
0045 *tpext_delb4pollcb(3)*
0046 
0047 COPYING
0048 -------
0049 (C) Mavimax, Ltd
0050