This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

Re: TCP/IP stack questions


On Wed, Mar 29, 2000 at 03:13:25PM -0700, Gary Thomas wrote:

> > I've got a couple questions about the TCP/IP stack that we
> > haven't been able to answer after a brief look through the
> > source code:
> > 
> >  1) Can you do a non-blocking accept() on a socket?
>  
> Yes.  However, the easiest way to do this is to use 'select()'
> on the socket after you have done a 'listen()'.

Ah yes.  Should have thought of that. Thanks.

> >  2) Does the stack start any tasks of its own?  If so what are
> >     their priorities?  Our application has one task that never
> >     blocks, so if anybody creates a task with a lower priority
> >     than that, it will never run.  ;)
> 
> Yes, there is one additional thread started by the network code.
> This thread runs background maintenance and helps move data through
> the stack as it comes in via interrupts.
> 
> The background thread priority is set up using this CDL:
>     cdl_option CYGPKG_NET_THREAD_PRIORITY {

As usual, I found that right after I posted the question. ;)

> BTW why does your thread never block?

Not sure (I'm not writing the app).  In the past, all of the
real-time systems I've worked on had a low-priority task that
did self-test type stuff in the background (memory tests,
hardware diagnostics, stuff like that).  We always set that
task to be the lowest priority, and just let it run when there
wasn't anything else to do.

-- 
Grant Edwards
grante@visi.com

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