[openbeosnetteam] Re: Yet another select() support fix. again.

> > I really don't like having these fd_sets duplicated in both 
> > net_stack_cookie and internal socket structs.
> > Maybe select() could share the three fd_sets bits vectors thru a 
> > area_id + offsets, instead?
>
> I don't think that a few additional copies are reason enough 
> for optimizing something that is not finished.

Agreed.
The problem is that there's duplicate fd_sets in both (kernelland only) 
net_stack_cookie struct and core module managed socket structure.
In the process to remove this duplication, I fall by this stupid idea.

> > BTW, is select() supposed to be thread-safety or not?
> I think no posix calles are supposed to be thread save.
> But I suppose it must work that one thread calles select(), and and
> another calles write() or something like this. This means that you 
> have to properly lock and unlock internal data.

Alright. I think this case is properly handle (or it's a bug, but 
support for this is here).
My thread-safety fear was about two threads select()'ing on same(s) 
fd(s).

-Philippe 

--
Fortune Cookie Says:

"There are three possibilities: Pioneer's solar panel has turned away
from the sun; there's a large meteor blocking transmission; or someone
loaded Star Trek 3.2 into our video processor."


Other related posts: