sleep.h 464 B

12345678910111213141516171819
  1. #include <linux/wait.h>
  2. /*
  3. * Do not use. This is a replacement for the old
  4. * "interruptible_sleep_on_timeout" function that has been
  5. * deprecated for ages. All users should instead try to use
  6. * wait_event_interruptible_timeout.
  7. */
  8. static inline long
  9. oss_broken_sleep_on(wait_queue_head_t *q, long timeout)
  10. {
  11. DEFINE_WAIT(wait);
  12. prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE);
  13. timeout = schedule_timeout(timeout);
  14. finish_wait(q, &wait);
  15. return timeout;
  16. }