Created
April 13, 2011 21:31
-
-
Save edwintorok/918468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asm volatile("movzwl %2, %0\n\t" | |
"cmpb %h0,%b0\n\t" | |
"leal 0x100(%" REG_PTR_MODE "0), %1\n\t" | |
"jne 1f\n\t" | |
LOCK_PREFIX "cmpxchgw %w1,%2\n\t" | |
"1:" | |
"sete %b1\n\t" | |
"movzbl %b1,%0\n\t" | |
: "=&a" (tmp), "=&q" (new), "+m" (lock->slock) | |
: | |
: "memory", "cc"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment