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]

problem with SYSINIT in support.c


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


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