Merge tag 'v4.4-rc4'
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rkwifi / bcmdhd / dhd_linux_sched.c
1 /*
2  * Expose some of the kernel scheduler routines
3  *
4  * $Copyright Open Broadcom Corporation$
5  *
6  * $Id: dhd_linux_sched.c 457570 2014-02-23 13:54:46Z $
7  */
8 #include <linux/kernel.h>
9 #include <linux/module.h>
10 #include <linux/sched.h>
11 #include <typedefs.h>
12 #include <linuxver.h>
13
14 int setScheduler(struct task_struct *p, int policy, struct sched_param *param)
15 {
16         int rc = 0;
17 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0))
18         rc = sched_setscheduler(p, policy, param);
19 #endif /* LinuxVer */
20         return rc;
21 }
22
23 int get_scheduler_policy(struct task_struct *p)
24 {
25         int rc = SCHED_NORMAL;
26 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0))
27         rc = p->policy;
28 #endif /* LinuxVer */
29         return rc;
30 }