diff options
author | Peter Dufault <dufault@FreeBSD.org> | 2000-03-02 16:20:07 +0000 |
---|---|---|
committer | Peter Dufault <dufault@FreeBSD.org> | 2000-03-02 16:20:07 +0000 |
commit | 383774c41767c4780eb4265f77a34190d80a2572 (patch) | |
tree | 033a04354a6638e161b42329df53353bee0a19d4 /sys/amd64 | |
parent | 290c9a02c3e3509b704a108e0c746323d54da7f6 (diff) | |
download | src-383774c41767c4780eb4265f77a34190d80a2572.tar.gz src-383774c41767c4780eb4265f77a34190d80a2572.zip |
Patches that eliminate extra context switches in FIFO case.
Fixes p1003_1b regression test in the simple case of no RR and
FIFO processes competing.
Reviewed by: jkh, bde
Notes
Notes:
svn path=/head/; revision=57701
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/trap.c | 1 | ||||
-rw-r--r-- | sys/amd64/include/cpu.h | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a8b73cf6a02b..836555c905a8 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -196,6 +196,7 @@ userret(p, frame, oticks) (u_int)(p->p_sticks - oticks) * psratio); curpriority = p->p_priority; + currtpriority = p->p_rtprio.prio; } /* diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 666af5cae395..18049d0d681b 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -83,7 +83,7 @@ * Preempt the current process if in interrupt from user mode, * or after the current trap/syscall if in system mode. */ -#define need_resched() { want_resched = 1; aston(); } +#define need_resched() do { want_resched = 1; aston(); } while (0) #define resched_wanted() want_resched @@ -94,7 +94,8 @@ * single tick and the P_OWEUPC flag served as a counter. Now there is a * counter in the proc table and flag isn't really necessary. */ -#define need_proftick(p) { (p)->p_flag |= P_OWEUPC; aston(); } +#define need_proftick(p) \ + do { (p)->p_flag |= P_OWEUPC; aston(); } while (0) /* * Notify the current process (p) that it has a signal pending, |