Go to the documentation of this file.
9 #ifndef _ASM_X86_MUTEX_32_H
10 #define _ASM_X86_MUTEX_32_H
24 #define __mutex_fastpath_lock(count, fail_fn) \
28 typecheck(atomic_t *, count); \
29 typecheck_fn(void (*)(atomic_t *), fail_fn); \
31 asm volatile(LOCK_PREFIX " decl (%%eax)\n" \
33 " call " #fail_fn "\n" \
37 : "memory", "ecx", "edx"); \
55 return fail_fn(count);
73 #define __mutex_fastpath_unlock(count, fail_fn) \
77 typecheck(atomic_t *, count); \
78 typecheck_fn(void (*)(atomic_t *), fail_fn); \
80 asm volatile(LOCK_PREFIX " incl (%%eax)\n" \
82 " call " #fail_fn "\n" \
86 : "memory", "ecx", "edx"); \
89 #define __mutex_slowpath_needs_to_unlock() 1
116 #ifdef __HAVE_ARCH_CMPXCHG
121 return fail_fn(count);