Kay Röpke wrote: > hi! > > On Mar 8, 2009, at 7:15 PM, Monty Taylor wrote: > >> Kay Röpke wrote: >>> >>> just for my benefit: what is the deal with 4.0.2? does it pertain to >>> C++ or >>> is it of general nature? >> >> A couple of things: >> >> - It give some warnings (which for us are errors) which are actually >> truly spurious and incorrect. I can't think of an example at the moment, >> but I believe we had some issues a while ago with "this could be used >> uninitialized" and "this is unreachable" - neither of which were true. :) > > 'k, that's mightily annoying > >> - 4.2 got a lockless tr1::shared_ptr > > thank god i'm not doing c++ :)
shared_ptr is your friend... >> - 4.0 doesn't have gcc atomics support > > does this mean you are relying on compiler support for atomic ops? i see > the section of the gcc 4.2 manual referring to Itanium, what's up with > that? are the docs vague? Yes... I think it's that the interface was designed from the interface of the Itanium atomics. They should just not mention Itanium there, since it's misleading. > it strikes me as odd, considering that most, if not all, modern > operating systems ship this kind of thing in libc. i might be missing > something, though (and am genuinely interested in what that might be, > since i'm working on lock-free data structures right now). > however, if the goal is to save you the ld stub call to libc and > inlining the assembly required, i can see the point. It's not that implementations aren't all over the place (and I certainly don't mind link steps) - the real problem is finding standard interfaces for this stuff. GCC atomics was a nice stop gap for dealing with that for us... except it still isn't a win because we can't use GCC on Solaris. So what I wound up doing is making a local impl of atomic<> for when one isn't there already and filling in the impl with gcc atomics if we're on GCC and atomic.h if we're on solaris. If all of the above fails, with pthread locks. (eek) If I'd known about 4.2 on OSX, I wouldn't have had to write the pthread-lock implementation, since GCC4.0 on OSX was the only one that wasn't covered by existing interfaces to system atomic behavior. In fact ... I might be able to delete it now... These will pretty much be useful for decent interface to things like counters and the like, I think... still working on it though. >> Other things I'm forgetting... I know we have more than once pushed code >> that tests fine elsewhere only to have it vomit at the last minute on >> Brian's Mac laptop. > > the joy of "posix". sometimes the certification makes you feel like it's > just a bullet point ;) > otoh, i don't even want to begin to imagine what the world would look > like if we didn't have at least that... NO KIDDING. >> I tested the "force 4.2 on Mac" patch last night... works like a charm! >> I now owe you a beer. > > yay! (on both accounts) :) > > cheers, > -k > _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

