diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-17 13:18:48 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-17 13:18:48 +0000 |
commit | 3d945c7ae401b425bbcb8b2ac6c947b6c044bff6 (patch) | |
tree | 25560fa7812189e474dc74e9af9f30534336e0c3 /sys/arch/i386 | |
parent | 5f743a2d8b406a317180efcac6c7c8955ff2a10a (diff) |
Replace curcpu_is_idle() by cpu_is_idle() and use it instead of rolling
our own.
From Michal Mazurek, ok mmcc@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index e88373c3898..e7b434838c5 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.73 2016/03/15 03:17:50 guenther Exp $ */ +/* $OpenBSD: cpu.c,v 1.74 2016/03/17 13:18:47 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -751,7 +751,7 @@ cpu_idle_mwait_cycle(void) panic("idle with interrupts blocked!"); /* something already queued? */ - if (ci->ci_schedstate.spc_whichqs != 0) + if (!cpu_is_idle(ci)) return; /* @@ -765,7 +765,7 @@ cpu_idle_mwait_cycle(void) * the check in sched_idle() and here. */ atomic_setbits_int(&ci->ci_mwait, MWAIT_IDLING | MWAIT_ONLY); - if (ci->ci_schedstate.spc_whichqs == 0) { + if (cpu_is_idle(ci)) { monitor(&ci->ci_mwait, 0, 0); if ((ci->ci_mwait & MWAIT_IDLING) == MWAIT_IDLING) mwait(0, 0); |