This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: select () confusion


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]