]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/i386_lock.s
xnu-1228.12.14.tar.gz
[apple/xnu.git] / osfmk / i386 / i386_lock.s
index b5153c73dbfd25907f0c42464f59ef4f513c727e..e4d7f7c1e466f83c423a3a49a750644622610660 100644 (file)
@@ -420,6 +420,7 @@ LEAF_ENTRY(hw_lock_to)
        push    %ebx
        mov     %edx,%edi
 
+       lfence
        rdtsc                           /* read cyclecount into %edx:%eax */
        lfence
        addl    %ecx,%eax               /* fetch and timeout */
@@ -442,6 +443,7 @@ LEAF_ENTRY(hw_lock_to)
        /*
         * Here after spinning INNER_LOOP_COUNT times, check for timeout
         */
+       lfence
        rdtsc                           /* cyclecount into %edx:%eax */
        lfence
        cmpl    %ecx,%edx               /* compare high-order 32-bits */