Arnd Bergmann | cdef2e5 | 2014-01-02 13:07:51 +0100 | [diff] [blame^] | 1 | #include <linux/wait.h> |
| 2 | |
| 3 | /* |
| 4 | * Do not use. This is a replacement for the old |
| 5 | * "interruptible_sleep_on_timeout" function that has been |
| 6 | * deprecated for ages. All users should instead try to use |
| 7 | * wait_event_interruptible_timeout. |
| 8 | */ |
| 9 | |
| 10 | static inline long |
| 11 | oss_broken_sleep_on(wait_queue_head_t *q, long timeout) |
| 12 | { |
| 13 | DEFINE_WAIT(wait); |
| 14 | prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE); |
| 15 | timeout = schedule_timeout(timeout); |
| 16 | finish_wait(q, &wait); |
| 17 | return timeout; |
| 18 | } |