diff options
author | dufault <dufault@FreeBSD.org> | 2000-03-02 16:20:07 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 2000-03-02 16:20:07 +0000 |
commit | 0bdb67cb2672dc34361104d402e97e00a6bfd8cd (patch) | |
tree | 30c7555ed16fc39ed9cdf8dd5c51ed5620cbd7d4 /sys/amd64/include/cpu.h | |
parent | c68b859120e19108ab43f55dd8f8a7616c685677 (diff) | |
download | FreeBSD-src-0bdb67cb2672dc34361104d402e97e00a6bfd8cd.zip FreeBSD-src-0bdb67cb2672dc34361104d402e97e00a6bfd8cd.tar.gz |
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
Diffstat (limited to 'sys/amd64/include/cpu.h')
-rw-r--r-- | sys/amd64/include/cpu.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 666af5c..18049d0 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, |