Changeset a972c1d22e20ad5691ec02d6d77117dc1a59b6a9

Show
Ignore:
Timestamp:
08/15/10 16:08:06 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1281888486 +0000
git-parent:

[f0374e892e0faa67773d93b32ba9be5646f6561d]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1281888486 +0000
Message:

we don't support PPC anyway, let's use the same gcc code everywhere

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_atomic.h

    rf0374e8 ra972c1d  
    3939typedef int64_t noit_atomic64_t; 
    4040 
    41 #ifdef HAVE_LIBKERN_OSATOMIC_H 
    42 /* 
    43  * This secion is for Darwin. 
    44  * And we simply don't run on 32bit PPC.  Life's a bitch. 
    45  */ 
    46 #include <libkern/OSAtomic.h> 
    47 typedef OSSpinLock noit_spinlock_t; 
    48 #define noit_atomic_cas32(ref,new,old) (OSAtomicCompareAndSwap32(old,new,ref) ? old : new) 
    49 #define noit_atomic_cas64(ref,new,old) (OSAtomicCompareAndSwap64(old,new,ref) ? old : new) 
    50 #define noit_atomic_casptr(ref,new,old) (OSAtomicCompareAndSwapPtr(old,new,(void *)ref) ? old : new) 
    51 #define noit_atomic_add32(ref,diff) OSAtomicAdd32(diff,ref) 
    52 #define noit_atomic_add64(ref,diff) OSAtomicAdd64(diff,ref) 
    53 #define noit_atomic_sub32(ref,diff) OSAtomicAdd32(0-(diff),ref) 
    54 #define noit_atomic_sub64(ref,diff) OSAtomicAdd64(0-(diff),ree) 
    55 #define noit_atomic_inc32(ref) OSAtomicIncrement32(ref) 
    56 #define noit_atomic_inc64(ref) OSAtomicIncrement64(ref) 
    57 #define noit_atomic_dec32(ref) OSAtomicDecrement32(ref) 
    58 #define noit_atomic_dec64(ref) OSAtomicDecrement64(ref) 
    59 #define noit_spinlock_lock OSSpinLockLock 
    60 #define noit_spinlock_unlock OSSpinLockUnlock 
    61 #define noit_spinlock_trylock OSSpinLockTry 
    62 #elif defined(__GNUC__) 
     41#if defined(__GNUC__) 
    6342 
    6443#if (SIZEOF_VOID_P == 4)