Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
mutex_64.h File Reference

Go to the source code of this file.

Macros

#define __mutex_fastpath_lock(v, fail_fn)
 
#define __mutex_fastpath_unlock(v, fail_fn)
 
#define __mutex_slowpath_needs_to_unlock()   1
 

Macro Definition Documentation

#define __mutex_fastpath_lock (   v,
  fail_fn 
)
Value:
do { \
unsigned long dummy; \
typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
asm volatile(LOCK_PREFIX " decl (%%rdi)\n" \
" jns 1f \n" \
" call " #fail_fn "\n" \
"1:" \
: "=D" (dummy) \
: "D" (v) \
: "rax", "rsi", "rdx", "rcx", \
"r8", "r9", "r10", "r11", "memory"); \
} while (0)

__mutex_fastpath_lock - decrement and call function if negative : pointer of type atomic_t : function to call if the result is negative

Atomically decrements and calls <fail_fn> if the result is negative.

Definition at line 19 of file mutex_64.h.

#define __mutex_fastpath_unlock (   v,
  fail_fn 
)
Value:
do { \
unsigned long dummy; \
typecheck_fn(void (*)(atomic_t *), fail_fn); \
\
asm volatile(LOCK_PREFIX " incl (%%rdi)\n" \
" jg 1f\n" \
" call " #fail_fn "\n" \
"1:" \
: "=D" (dummy) \
: "D" (v) \
: "rax", "rsi", "rdx", "rcx", \
"r8", "r9", "r10", "r11", "memory"); \
} while (0)

__mutex_fastpath_unlock - increment and call function if nonpositive : pointer of type atomic_t : function to call if the result is nonpositive

Atomically increments and calls <fail_fn> if the result is nonpositive.

Definition at line 62 of file mutex_64.h.

#define __mutex_slowpath_needs_to_unlock ( )    1

Definition at line 79 of file mutex_64.h.