Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
jfs_lock.h File Reference
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/sched.h>

Go to the source code of this file.

Macros

#define __SLEEP_COND(wq, cond, lock_cmd, unlock_cmd)
 

Macro Definition Documentation

#define __SLEEP_COND (   wq,
  cond,
  lock_cmd,
  unlock_cmd 
)
Value:
do { \
DECLARE_WAITQUEUE(__wait, current); \
add_wait_queue(&wq, &__wait); \
for (;;) { \
set_current_state(TASK_UNINTERRUPTIBLE);\
if (cond) \
break; \
unlock_cmd; \
io_schedule(); \
lock_cmd; \
} \
__set_current_state(TASK_RUNNING); \
remove_wait_queue(&wq, &__wait); \
} while (0)

Definition at line 35 of file jfs_lock.h.