diff -r eeca1427ce51 code/nel/include/nel/misc/mutex.h --- a/code/nel/include/nel/misc/mutex.h Fri May 07 10:10:55 2010 +0200 +++ b/code/nel/include/nel/misc/mutex.h Mon May 10 21:07:45 2010 +0200 @@ -237,7 +237,11 @@ # endif // NL_DEBUG # endif // NL_NO_ASM #else - ASM_ASWAP_FOR_GCC_XCHG + // GCC implements the same functionality using a builtin function + // http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html + // the macro below crashed on Mac OS X 10.6 in a 64bit build + //ASM_ASWAP_FOR_GCC_XCHG + result = __sync_bool_compare_and_swap(lockPtr, 0, 1); #endif // NL_OS_WINDOWS return result != 0; }