/*
 * include/linux/low-latency.h
 *
 * Andrew Morton <andrewm@uow.edu.au>
 */

#ifndef LOW_LATENCY_H_INCLUDED
#define LOW_LATENCY_H_INCLUDED

#include <linux/cache.h>		/* For ____cacheline_aligned */

#define conditional_schedule_needed() (current->need_resched)

void set_running_and_schedule(void);
#define unconditional_schedule() set_running_and_schedule()

#define conditional_schedule()						\
	do {								\
		if (conditional_schedule_needed())			\
			unconditional_schedule();			\
	} while (0)

extern int ll_copy_to_user(void *to_user, const void *from, unsigned long len);

#endif /* LOW_LATENCY_H_INCLUDED */

