[ECOS] Re: What causes interrupted network system calls?
Grant Edwards
grant.b.edwards@gmail.com
Thu Oct 29 19:04:00 GMT 2009
On 2009-10-29, Nick Garnett <nickg@ecoscentric.com> wrote:
> Grant Edwards <grant.b.edwards@gmail.com> writes:
>
> If you don't have the POSIX package then there won't be any
> signal deliver of the sort that could affect the net stack.
That's what I thought.
> The net stack interprets any return from an event signal that
> is not a proper signal or a timeout as an interrupt and
> returns EINTR. If POSIX is not included then something else
> must be forcing that thread out of the semaphore wait. Perhaps
> there are other parts of the system that call
> cyg_thread_release()
Yep, I just realized that any call to cyg_thread_release() on a
thread that's doing network stuff could cause an EINTR. I
don't think "signals" (in the POSIX/libc sense) have anything
to do with it.
> and may be zapping the wrong thread. Or perhaps the right
> thread at the wrong time.
I'm now betting it's going to turn out to be the latter. It
looks like there is a case where one task calls
cyg_thread_release() to wake up another task (which I think is
the task that's seeing the EINTR). That bit of synchronization
should probably be done with an event flag or something...
--
Grant Edwards grante Yow! Is my fallout shelter
at termite proof?
visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list