This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: TCP close(...) action
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Matt Jerdonek <maj1224 at yahoo dot com>
- Cc: Andrew Lunn <andrew at lunn dot ch>,Discussion eCos <ecos-discuss at sources dot redhat dot com>
- Date: 22 Oct 2003 18:14:02 +0100
- Subject: Re: [ECOS] TCP close(...) action
- References: <20031022160616.6689.qmail@web14204.mail.yahoo.com>
Matt Jerdonek <maj1224@yahoo.com> writes:
> > If you re-write your test program to use POSIX
> > threads, it should then be possible to run it on
> > linux, SunOS, *BSD etc. We can then decide if this
> > is right or wrong.
> >
> > Andrew
> >
> > --
>
>
> I ran the program on linux and got the same result
> (the close did not wake the recv). So, I guess that
> eCos is behaving correctly.
Given that the eCos file handling model is almost identical to that of
Linux, BSD and any other Unix variant, I would expect that they would
all behave in much the same way.
>
> As I mentioned before, I have a workaround using
> cyg_thread_release(..). Does anyone know of a POSIX
> method for waking the recv other than ending and
> restarting the thread?
You might be able to do something fancy using select() in place of the
recv(). Signalling a select()ing thread should work -- although that
is essentially just the same as the cyg_thread_release() you are
already doing.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss