MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getscheduler

Function getscheduler

freebsd/kern/ksched.c:107–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105#define P1B_PRIO_MAX rtpprio_to_p4prio(RTP_PRIO_MIN)
106
107static __inline int
108getscheduler(struct ksched *ksched, struct thread *td, int *policy)
109{
110 struct rtprio rtp;
111 int e;
112
113 e = 0;
114 pri_to_rtp(td, &rtp);
115 switch (rtp.type) {
116 case RTP_PRIO_FIFO:
117 *policy = SCHED_FIFO;
118 break;
119 case RTP_PRIO_REALTIME:
120 *policy = SCHED_RR;
121 break;
122 default:
123 *policy = SCHED_OTHER;
124 break;
125 }
126 return (e);
127}
128
129int
130ksched_setparam(struct ksched *ksched,

Callers 2

ksched_setparamFunction · 0.85
ksched_getschedulerFunction · 0.85

Calls 1

pri_to_rtpFunction · 0.85

Tested by

no test coverage detected