[ECOS] problem with SYSINIT in support.c
Vijay Padiyar
vijay_padiyar@hotmail.com
Wed Sep 22 08:58:00 GMT 2004
Hello
The following is code from the 'support.c'
file(ecos\packages\net\bsd_tcpip\current\src\ecos\):
-----------------------------------------------------------------------
SYSINIT(devs, SI_SUB_DEVICES, SI_ORDER_FIRST, cyg_net_init_devs, NULL)
void
cyg_net_init(void)
{
static int _init = false;
struct init_tab_entry *init_entry;
#ifdef CYGPKG_NET_FORCE_SERIAL_CONSOLE
int orig_console =
CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
#endif
if (_init) return;
...........
...........
...........
...........
} // end SYSINIT
-------------------------------------------------------------------
Presently, the function 'cyg_net_init()' is coming as a member function of
'SYSINIT()'. But 'SYSINIT()' is defined as a macro in 'param.h'. Besides,
none of the arguments in the bracket after 'SYSINIT' are used in the code
below.
Is this a bug? Should there be a semi-column after 'SYSINIT()'? Doing this
makes 'cyg_net_init()' a separate function.
-------------------------------------------------------------------
SYSINIT(devs, SI_SUB_DEVICES, SI_ORDER_FIRST, cyg_net_init_devs, NULL);
//<----- semi-column
-------------------------------------------------------------------
Regards
Chandrashekhar Padiyar
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list