On 20 Jul 2010 13:03:57 +0100
"N.M. Maclaren" <n...@cam.ac.uk> wrote:
> 
> Not on most systems.  While this is more clearly illegal, similar
> remarks apply to its safety.  If there were any debugging C compilers
> around, it might well get trapped, but those are about as common as
> unicorns.
> 
> It's a horrible coding style, but this is a case of damned if you do,
> and damned if you don't.

Yep the only other way to do it I saw was to create an unsigned version
of OPAL_ATOMIC_CMPSET_32. But this code is *only* used for debug
purposes for so I thought that was excessive. And I agree that
twos complement representation should make this ok, albeit ugly.

Chris
-- 
cy...@ozlabs.org

Reply via email to