prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
if (condition) \
break; \
- if (!signal_pending(current)) { \
- tty_unlock(tty); \
- schedule(); \
- tty_lock(tty); \
- continue; \
+ if (signal_pending(current)) { \
+ ret = -ERESTARTSYS; \
+ break; \
} \
- ret = -ERESTARTSYS; \
- break; \
+ tty_unlock(tty); \
+ schedule(); \
+ tty_lock(tty); \
} \
finish_wait(&wq, &__wait); \
} while (0)
prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
if (condition) \
break; \
- if (!signal_pending(current)) { \
- schedule(); \
- continue; \
+ if (signal_pending(current)) { \
+ ret = -ERESTARTSYS; \
+ break; \
} \
- ret = -ERESTARTSYS; \
- break; \
+ schedule(); \
} \
finish_wait(&wq, &__wait); \
} while (0)
prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
if (condition) \
break; \
- if (!signal_pending(current)) { \
- ret = schedule_timeout(ret); \
- if (!ret) \
- break; \
- continue; \
+ if (signal_pending(current)) { \
+ ret = -ERESTARTSYS; \
+ break; \
} \
- ret = -ERESTARTSYS; \
- break; \
+ ret = schedule_timeout(ret); \
+ if (!ret) \
+ break; \
} \
if (!ret && (condition)) \
ret = 1; \
finish_wait(&wq, &__wait); \
break; \
} \
- if (!signal_pending(current)) { \
- schedule(); \
- continue; \
- } \
- ret = -ERESTARTSYS; \
- abort_exclusive_wait(&wq, &__wait, \
+ if (signal_pending(current)) { \
+ ret = -ERESTARTSYS; \
+ abort_exclusive_wait(&wq, &__wait, \
TASK_INTERRUPTIBLE, NULL); \
- break; \
+ break; \
+ } \
+ schedule(); \
} \
} while (0)