This is the mail archive of the ecos-discuss@sourceware.org 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: Flag query


Bell, Andrew [Allen & Heath UK] wrote:
Hello All

I'm still trying to diagnose a netstack stall, and have traced the
packet delivery through my fec driver, into the generic Ethernet driver
and into if_ethersubr.c which demuxes the different protocols and then
calls software interrupts using schednetisr. In eCos this function seams
to be implemented using flags, the network thread sleeps on
cyg_flag_wait, and when schednetisr or's in a bit signaling a particular
protocol has arrived and is ready for a push into the protocol stack
cyg_netint in support.c is suppose to wake and call the appropriate
netisr handler. Fine.


My trace shows the call to schednetisr, and inside flags.cxx I can see
setbits is called, but cyg_netint (network thread) fails to wake. My
question .... Is there a good way of debugging the scheduling loop, from
what I can see the bottom of setbits in flags.cxx should call
Cyg_Scheduler::unlock, shouldn't this cause a reschedule ? My network
thread priority in higher than any user thread (lower numerically), im
kind of hoping for a context switch. Eventually my connection gets
dropped as the starvation of my tcp/ip stack means no acks are being
tx'd.

Any help as always would be greatly appreciated.

If you connect via GDB and break when this happens, then you should be able to get information via: (gdb) info threads

This should tell you information about all of the threads in the system.

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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