This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problem with SYSINIT in support.c
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Vijay Padiyar" <vijay_padiyar at hotmail dot com>
- Cc: "eCos Support" <ecos-discuss at sources dot redhat dot com>,"Andrew Lunn" <andrew dot lunn at ascom dot ch>
- Date: 22 Sep 2004 09:58:33 +0100
- Subject: Re: [ECOS] problem with SYSINIT in support.c
- References: <BAY1-DAV6FRyqwdpOTz0002eb4e@hotmail.com>
"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