]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/gen/OSAtomicOperations.c
xnu-792.13.8.tar.gz
[apple/xnu.git] / libkern / gen / OSAtomicOperations.c
index 1eedf229133d1a28040ea20b142ee2cab18c4d8b..d3e5728682d5da60b5a3b31568364045ac57bef7 100644 (file)
@@ -36,7 +36,6 @@ enum {
 };
 #define        NULL 0L
 
-
 /*
  * atomic operations
  *     these are _the_ atomic operations, currently cast atop CompareAndSwap,
@@ -79,6 +78,7 @@ SInt32        OSDecrementAtomic(SInt32 * value)
        return OSAddAtomic(-1, value);
 }
 
+#ifdef CMPXCHG8B
 void * OSDequeueAtomic(void ** inList, SInt32 inOffset)
 {
        void *  oldListHead;
@@ -93,7 +93,6 @@ void *        OSDequeueAtomic(void ** inList, SInt32 inOffset)
                newListHead = *(void **) (((char *) oldListHead) + inOffset);
        } while (! OSCompareAndSwap((UInt32)oldListHead,
                                        (UInt32)newListHead, (UInt32 *)inList));
-       
        return oldListHead;
 }
 
@@ -109,7 +108,7 @@ void        OSEnqueueAtomic(void ** inList, void * inNewLink, SInt32 inOffset)
        } while (! OSCompareAndSwap((UInt32)oldListHead, (UInt32)newListHead,
                                        (UInt32 *)inList));
 }
-
+#endif /* CMPXCHG8B */
 #endif /* !__ppc__ */
 
 static UInt32  OSBitwiseAtomic(UInt32 and_mask, UInt32 or_mask, UInt32 xor_mask, UInt32 * value)