From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- drivers/net/wireless/bcmdhd/dhd_linux_sched.c | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 drivers/net/wireless/bcmdhd/dhd_linux_sched.c (limited to 'drivers/net/wireless/bcmdhd/dhd_linux_sched.c') diff --git a/drivers/net/wireless/bcmdhd/dhd_linux_sched.c b/drivers/net/wireless/bcmdhd/dhd_linux_sched.c new file mode 100644 index 00000000..ed635b88 --- /dev/null +++ b/drivers/net/wireless/bcmdhd/dhd_linux_sched.c @@ -0,0 +1,30 @@ +/* + * Expose some of the kernel scheduler routines + * + * $Copyright Open Broadcom Corporation$ + * + * $Id: dhd_linux_sched.c 457570 2014-02-23 13:54:46Z $ + */ +#include +#include +#include +#include +#include + +int setScheduler(struct task_struct *p, int policy, struct sched_param *param) +{ + int rc = 0; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)) + rc = sched_setscheduler(p, policy, param); +#endif /* LinuxVer */ + return rc; +} + +int get_scheduler_policy(struct task_struct *p) +{ + int rc = SCHED_NORMAL; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)) + rc = p->policy; +#endif /* LinuxVer */ + return rc; +} -- cgit v1.3.1