]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/lock.h
xnu-1228.tar.gz
[apple/xnu.git] / osfmk / i386 / lock.h
index ef9f4cff30cb12ece4503d8640c4aa3c6b604b66..f497a82b2544d7584c8e3d077e96d0b5bae8fb47 100644 (file)
@@ -95,7 +95,8 @@ typedef struct {
 
 typedef lck_rw_t lock_t;
 
-extern unsigned int LockTimeOut;                       /* Number of hardware ticks of a lock timeout */
+extern unsigned int LockTimeOutTSC;    /* Lock timeout in TSC ticks */
+extern unsigned int LockTimeOut;       /* Lock timeout in absolute time */ 
 
 
 #if defined(__GNUC__)
@@ -186,7 +187,7 @@ atomic_cmpxchg(uint32_t *p, uint32_t old, uint32_t new)
 {
        uint32_t res = old;
 
-       asm volatile(
+       __asm__ volatile(
                "lock;  cmpxchgl        %1,%2;  \n\t"
                "       setz            %%al;   \n\t"
                "       movzbl          %%al,%0"
@@ -232,7 +233,7 @@ static inline void  atomic_decl(volatile long * p, long delta)
 static inline int      atomic_decl_and_test(volatile long * p, long delta)
 {
        uint8_t ret;
-       asm volatile (
+       __asm__ volatile (
                "       lock            \n\t"
                "       subl    %1,%2   \n\t"
                "       sete    %0"