This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: select () confusion
- To: "Trenton D. Adams" <tadams at extremeeng dot com>
- Subject: Re: [ECOS] select () confusion
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 02 Aug 2001 23:04:56 +0100
- Cc: 'eCos Discussion' <ecos-discuss at sourceware dot cygnus dot com>
- Organization: Red Hat UK Ltd.
- References: <000601c11b9d$e8012890$090110ac@TRENT>
"Trenton D. Adams" wrote:
>
> > Yes. Normally you track the largest fd you've ever had, or keep a
> list
> > of
> > fds. Or just use FD_SETSIZE if you're lazy IIRC.
> >
>
> IIRC?
If I recall correctly.
> I personally like the windows, BSD *compatible*, select better. The
> first parameter is there only for compatibility.
Yeah, that's because the reason it was there originally was for efficiency,
and we know that's not relevant for Windows ;).
> Since FD_SET always
> increments the fd count anyhow, I don't see a point in even using the
> first parameter.
Eh? FD_SET doesn't change the value of the highest fd you will be selecting
on, or the number of fds you have. It just sets a bit in a bitmask (the
fdset).
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine