This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Still on ethernet configuration
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: Cristiano Pereira <ligieri2002 at hotmail dot com>
- Cc: Andrew Lunn <andrew dot lunn at ascom dot ch>,eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 15 Oct 2002 12:30:51 -0600
- Subject: Re: [ECOS] Still on ethernet configuration
- References: <F153AB7diU2PilGWZEP0000fb4e@hotmail.com>
On Tue, 2002-10-15 at 12:26, Cristiano Pereira wrote:
> >Please CC to ecos-discuss....
>
> I'm sorry. I thought I had done it before.
>
> >So something is going wrong with scheduling. This reminds me of
> >something. The scheduler is not started until after cyg_user_start
> >exits. So the network thread will not start until cyg_user_start
> >exists. You say that init_net locks, so that seems to imply it needs
> >the network thread running. Move all you code into the thread. Make
> >cyg_user_start just start your net_test thread and then exit. This is in
> >fact how all the test/example applications work......
>
> You were right. That was such a silly mistake. Thanks. But now I have
> another proble (this is endless :( ...). init_net never returns. It
> seems to get stuck at this piece of code:
>
> // Must do this temporarily with default route and netmask so that
> // [sub]netmask can be set.
> strcpy(ifr.ifr_name, intf);
>
> if (ioctl(s, SIOCSIFADDR, &ifr)) {
> perror("SIOCIFADDR");
> return false;
> }
>
> looks like ioctl never returns. Does anybody faced the same problem before?
One question (which I don't recall having been asked): how are
you trying to run/debug this code?
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss