({ unsigned char ret; \
__asm __volatile (LOCK_INSTR "cmpxchgl %2, %1; setne %0" \
: "=a" (ret), "=m" (futex) \
- : "r" (1), "1" (futex), "0" (0) \
+ : "r" (1), "m" (futex), "0" (0) \
: "memory"); \
ret; })
".previous\n" \
"1:" \
: "=a" (ignore1), "=&c" (ignore2), "=m" (futex) \
- : "0" (1), "2" (futex) \
+ : "0" (1), "m" (futex) \
: "memory"); })
".previous\n" \
"1:" \
: "=a" (ignore1), "=&c" (ignore2), "=m" (futex) \
- : "0" (2), "2" (futex) \
+ : "0" (2), "m" (futex) \
: "memory"); })
"1:" \
: "=a" (result), "=&c" (ignore1), "=&d" (ignore2), \
"=m" (futex) \
- : "0" (1), "3" (futex), "m" (timeout) \
+ : "0" (1), "m" (futex), "m" (timeout) \
: "memory"); \
result; })
".previous\n" \
"1:" \
: "=m" (futex), "=&a" (ignore) \
- : "0" (futex) \
+ : "m" (futex) \
: "memory"); })
({ unsigned char ret; \
__asm __volatile (LOCK_INSTR "cmpxchgl %2, %1; setne %0" \
: "=a" (ret), "=m" (futex) \
- : "r" (0), "1" (futex), "0" (1) \
+ : "r" (0), "m" (futex), "0" (1) \
: "memory"); \
ret; })
".previous\n" \
"1:" \
: "=a" (ignore1), "=&c" (ignore2), "=m" (futex) \
- : "0" (-1), "2" (futex) \
+ : "0" (-1), "m" (futex) \
: "memory"); })
".previous\n" \
"1:" \
: "=m" (futex), "=&a" (ignore) \
- : "0" (futex) \
+ : "m" (futex) \
: "memory"); })
#else
/* Special versions of the macros for use in libc itself. They avoid
"lock\n" \
"0:\tcmpxchgl %2, %1; setne %0" \
: "=a" (ret), "=m" (futex) \
- : "r" (0), "1" (futex), "0" (1), \
+ : "r" (0), "m" (futex), "0" (1), \
"i" (offsetof (tcbhead_t, multiple_threads)) \
: "memory"); \
ret; })
".previous\n" \
"2:" \
: "=a" (ignore1), "=&c" (ignore2), "=m" (futex) \
- : "0" (-1), "2" (futex), \
+ : "0" (-1), "m" (futex), \
"i" (offsetof (tcbhead_t, multiple_threads)) \
: "memory"); })
".previous\n" \
"2:" \
: "=m" (futex), "=&a" (ignore) \
- : "0" (futex), \
+ : "m" (futex), \
"i" (offsetof (tcbhead_t, multiple_threads)) \
: "memory"); })
#endif