diff options
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, |
