https://github.com/torvalds/linux
Raw File
Tip revision: a99cde438de0c4c0cecc1d1af1a55a75b10bfdef authored by Linus Torvalds on 04 July 2016, 06:01:00 UTC
Linux 4.7-rc6
Tip revision: a99cde4
sleep.h
#include <linux/wait.h>

/*
 * Do not use. This is a replacement for the old
 * "interruptible_sleep_on_timeout" function that has been
 * deprecated for ages. All users should instead try to use
 * wait_event_interruptible_timeout.
 */

static inline long
oss_broken_sleep_on(wait_queue_head_t *q, long timeout)
{
	DEFINE_WAIT(wait);
	prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE);
	timeout = schedule_timeout(timeout);
	finish_wait(q, &wait);
	return timeout;
}
back to top