mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Fix a typo and a bug.
- One RTP_PRIO_REALTIME was meant to be RTP_PRIO_IDLE. - RTP_PRIO_FIFO was not handled. - Move the usual case first for setrunqueue() etc.
This commit is contained in:
parent
e9fc0b372f
commit
42cef09ba2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50056
@ -82,14 +82,15 @@ setrunqueue(struct proc *p)
|
||||
u_int8_t pri;
|
||||
|
||||
KASSERT(p->p_stat == SRUN, ("setrunqueue: proc not SRUN"));
|
||||
if (p->p_rtprio.type == RTP_PRIO_REALTIME) {
|
||||
pri = p->p_rtprio.prio;
|
||||
q = &rtqueues[pri];
|
||||
rtqueuebits |= 1 << pri;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_NORMAL) {
|
||||
if (p->p_rtprio.type == RTP_PRIO_NORMAL) {
|
||||
pri = p->p_priority >> 2;
|
||||
q = &queues[pri];
|
||||
queuebits |= 1 << pri;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_REALTIME ||
|
||||
p->p_rtprio.type == RTP_PRIO_FIFO) {
|
||||
pri = p->p_rtprio.prio;
|
||||
q = &rtqueues[pri];
|
||||
rtqueuebits |= 1 << pri;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_IDLE) {
|
||||
pri = p->p_rtprio.prio;
|
||||
q = &idqueues[pri];
|
||||
@ -114,13 +115,14 @@ remrunqueue(struct proc *p)
|
||||
u_int8_t pri;
|
||||
|
||||
pri = p->p_rqindex;
|
||||
if (p->p_rtprio.type == RTP_PRIO_REALTIME) {
|
||||
q = &rtqueues[pri];
|
||||
which = &rtqueuebits;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_NORMAL) {
|
||||
if (p->p_rtprio.type == RTP_PRIO_NORMAL) {
|
||||
q = &queues[pri];
|
||||
which = &queuebits;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_REALTIME) {
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_REALTIME ||
|
||||
p->p_rtprio.type == RTP_PRIO_FIFO) {
|
||||
q = &rtqueues[pri];
|
||||
which = &rtqueuebits;
|
||||
} else if (p->p_rtprio.type == RTP_PRIO_IDLE) {
|
||||
q = &idqueues[pri];
|
||||
which = &idqueuebits;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user