From: Grant Edwards <grant.b.edwards@gmail.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: What causes interrupted network system calls?
Date: Thu, 29 Oct 2009 19:04:00 -0000 [thread overview]
Message-ID: <hccouk$841$1@ger.gmane.org> (raw)
In-Reply-To: <m3ljiu2fsa.fsf@xl5.calivar.com>
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
next prev parent reply other threads:[~2009-10-29 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-28 16:06 [ECOS] " Grant Edwards
2009-10-28 17:02 ` Carruth, Rusty
2009-10-28 17:15 ` [ECOS] " Grant Edwards
2009-10-28 17:53 ` Nick Garnett
2009-10-28 18:05 ` Grant Edwards
2009-10-28 18:27 ` Nick Garnett
2009-10-28 18:40 ` Grant Edwards
2009-10-29 18:34 ` Grant Edwards
2009-10-29 18:53 ` Nick Garnett
2009-10-29 19:04 ` Grant Edwards [this message]
2009-10-28 18:33 ` Grant Edwards
2009-10-28 18:41 ` Nick Garnett
2009-10-28 18:15 ` Carruth, Rusty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hccouk$841$1@ger.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=ecos-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).