add_wait_queue(&(queue), &entry); \
\
for (;;) { \
- current->state = TASK_INTERRUPTIBLE; \
+ __set_current_state(TASK_INTERRUPTIBLE); \
if (condition) \
break; \
if (time_after_eq(jiffies, end)) { \
break; \
} \
} \
- current->state = TASK_RUNNING; \
+ __set_current_state(TASK_RUNNING); \
remove_wait_queue(&(queue), &entry); \
} while (0)
add_wait_queue(&(queue), &entry); \
\
for (;;) { \
- current->state = TASK_INTERRUPTIBLE; \
+ __set_current_state(TASK_INTERRUPTIBLE); \
if (condition) \
break; \
if (time_after_eq(jiffies, end)) { \
break; \
} \
} \
- current->state = TASK_RUNNING; \
+ __set_current_state(TASK_RUNNING); \
remove_wait_queue(&(queue), &entry); \
} while (0)