Skip to content

Commit 38a312e

Browse files
committed
LinuxKPI: Implement sched_set_fifo(_low) functions
1 parent 093e33c commit 38a312e

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

linuxkpi/bsd/include/linux/sched.h

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef _BSD_LKPI_LINUX_SCHED_H_
2+
#define _BSD_LKPI_LINUX_SCHED_H_
3+
4+
#include_next <linux/sched.h>
5+
6+
#include <linux/hrtimer.h>
7+
8+
#include <sys/rtprio.h>
9+
10+
struct seq_file;
11+
12+
static inline void
13+
sched_set_fifo(struct task_struct *t)
14+
{
15+
struct rtprio rtp;
16+
17+
rtp.prio = RTP_PRIO_MAX / 2;
18+
rtp.type = RTP_PRIO_FIFO;
19+
rtp_to_pri(&rtp, t->task_thread);
20+
}
21+
22+
static inline void
23+
sched_set_fifo_low(struct task_struct *t)
24+
{
25+
struct rtprio rtp;
26+
27+
rtp.prio = RTP_PRIO_MAX; /* lowest priority */
28+
rtp.type = RTP_PRIO_FIFO;
29+
rtp_to_pri(&rtp, t->task_thread);
30+
}
31+
32+
#endif /* _BSD_LKPI_LINUX_SCHED_H_ */

linuxkpi/gplv2/include/linux/sched.h

-17
This file was deleted.

0 commit comments

Comments
 (0)