This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with SYSINIT in support.c


"Vijay Padiyar" <vijay_padiyar@hotmail.com> writes:

> 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
> 

This should not be necessary since the macro itself contains the
terminating semicolon. Since this code compiles for everybody else, I
suspect that there is a problem with your configuration. I suggest you
try making a new configuration in a clean directory.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]