Revision: 128 http://trac.macosforge.org/projects/libdispatch/changeset/128 Author: robert@fledge.watson.org Date: 2009-11-04 10:37:02 -0800 (Wed, 04 Nov 2009) Log Message: ----------- Directly test value of USE_APPLE_SEMAPHORE_OPTIMIZATIONS rather than testing whether it's defined. Modified Paths: -------------- trunk/src/semaphore.c Modified: trunk/src/semaphore.c =================================================================== --- trunk/src/semaphore.c 2009-11-04 16:04:51 UTC (rev 127) +++ trunk/src/semaphore.c 2009-11-04 18:37:02 UTC (rev 128) @@ -256,7 +256,7 @@ dispatch_group_enter(dispatch_group_t dg) { dispatch_semaphore_t dsema = (dispatch_semaphore_t)dg; -#if defined(USE_APPLE_SEMAPHORE_OPTIMIZATIONS) && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) +#if USE_APPLE_SEMAPHORE_OPTIMIZATIONS && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) // This assumes: // 1) Way too much about the optimizer of GCC. // 2) There will never be more than LONG_MAX threads. @@ -284,7 +284,7 @@ long dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout) { -#if defined(USE_APPLE_SEMAPHORE_OPTIMIZATIONS) && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) +#if USE_APPLE_SEMAPHORE_OPTIMIZATIONS && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) // This assumes: // 1) Way too much about the optimizer of GCC. // 2) There will never be more than LONG_MAX threads. @@ -362,7 +362,7 @@ long dispatch_semaphore_signal(dispatch_semaphore_t dsema) { -#if defined(USE_APPLE_SEMAPHORE_OPTIMIZATIONS) && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) +#if USE_APPLE_SEMAPHORE_OPTIMIZATIONS && defined(__OPTIMIZE__) && defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) && !defined(__llvm__) // overflow detection // this assumes way too much about the optimizer of GCC asm(
participants (1)
-
source_changes@macosforge.org