This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [ECOS] Wake select() with a signal
- From: Roland Caßebohm <roland dot cassebohm at visionsystems dot de>
- To: Nick Garnett <nickg at ecoscentric dot com>
- Cc: Jonathan Larmour <jifl at ecoscentric dot com>, ecos-patches at sources dot redhat dot com
- Date: Mon, 11 Nov 2002 12:53:58 +0100
- Subject: Re: [ECOS] Wake select() with a signal
- References: <200211011804.31718.roland.cassebohm@visionsystems.de> <200211081157.55598.roland.cassebohm@visionsystems.de> <m3wunlz9gh.fsf@ecoscentric.com>
On Sonntag, 10. November 2002 17:16, Nick Garnett wrote:
> Roland Caßebohm <roland.cassebohm@visionsystems.de> writes:
> > I have just tried it, but I have written a extra _pselect() function
> > which take a timeval structure, so for the normal and more used select()
> > the timeout don't have to be converted.
>
> [code snipped]
>
> > In my first impression it seems to work.
> > The prototype of pthread_self_info() is in the private headerfile
> > pprivate.h in compat/posix/current/src, which I can't access from
> > select.cxx, so I have to move this somewhere else.
> > Furthermore I have to include some #ifdef if signals are not implemented.
> >
> > What do you think about my advice?
>
> Hmm. My original response to this seems not to have made it to the
> mailing list, did either of you (Ronald, Jonathan) receive it
> directly?
No, I didn't.
>
> For the record here's what I said:
> >This is the problem that I was concerned about: doing it this way
> >breaks all the abstractions that exist between the POSIX and FILEIO
> >packages. There needs to be a clean interface between the two packages
> >to support this, and which needs to behave sensibly when the POSIX
> >package is absent, and doesn't over-complicate the structure of the
> >select operation.
> >
> >In general your implementation is very similar to what I would have
> >done, although I would also like to reorganize the code between the
> >lock and the unlock to avoid too much duplication of code.
> >
> >As a proof of concept your code is useful, but for the reasons above I
> >would not like to see it go into the repository as it stands.
> >
> >I'll tidy it up and put in the abstractions I think it needs.
>
> And attached is the diff for that tidyup. Roland, please give it a go
> and see if it behaves correctly for you.
It looks good :-). I just tried it and it works very well.
Thank you
Roland