Good question. Note that the connection list is fairly static, and is established (except w1) before threading is initiated.
The connection list is locked with a read/writer mutex. Connections are only removed by the w1 code (since the operating system creates a new bus master when one is removed and replaced). That is done only while no 1-wire queries are pending (non write-starved mutex). Paul Alfille On 5/24/09, Matthias Urlichs <[email protected]> wrote: > Hi, > > Christian Magnusson: > > > > > CheckThisConnection() should not have an integer as in input-argument, > > it should be a connection_in pointer. > > > Hmmm. > > > > - if ( CheckThisConnection(pn->known_bus->index,pn) >= 0 ) { > > + in = find_connection_in(pn->known_bus->index); > > + if ( CheckThisConnection(in,pn) >= 0 ) { > > > So what happens if/when find_connection_in() cannot find that connection > for some reason? > > owserver is a threaded program. Is that connection reference-counted, > to make sure that it won't vanish randomly? Why not? :-P > > > -- > Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected] > Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de > v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6 hackerkey.com > - - > Stability itself is nothing else than a more sluggish motion. > > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://www.creativitycat.com > _______________________________________________ > Owfs-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/owfs-developers > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
