summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-10-17 23:10:23 +0000
committerjhb <jhb@FreeBSD.org>2000-10-17 23:10:23 +0000
commit31c606939a660a9de8d00b6f751b86169ce3b4f5 (patch)
treef3248ccf2ed2ed3fcbbe6e778e98ba8d1f62dacc /sys
parent8006e3e8c736b4c7e42ca1249f6c1a888693d82d (diff)
downloadFreeBSD-src-31c606939a660a9de8d00b6f751b86169ce3b4f5.zip
FreeBSD-src-31c606939a660a9de8d00b6f751b86169ce3b4f5.tar.gz
- Catch up to moving headers, machine/ipl.h -> sys/ipl.h
- Fix some whitespace bogons. Submitted by: bde (2)
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c16
-rw-r--r--sys/i386/i386/machdep.c16
2 files changed, 18 insertions, 14 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 7055010..b334617 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@@ -96,7 +97,6 @@
#include <machine/clock.h>
#include <machine/specialreg.h>
#include <machine/bootinfo.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/mutex.h>
#include <machine/pc/bios.h>
@@ -996,7 +996,8 @@ cpu_halt(void)
*/
#ifndef SMP
static int cpu_idle_hlt = 1;
-SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable");
+SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
+ &cpu_idle_hlt, 0, "Idle loop HLT enable");
/*
* Note that we have to be careful here to avoid a race between checking
@@ -1007,13 +1008,13 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle
static void
cpu_idle(void *junk, int count)
{
- if (cpu_idle_hlt){
+ if (cpu_idle_hlt) {
disable_intr();
- if (procrunnable()) {
+ if (procrunnable())
enable_intr();
- } else {
+ else {
enable_intr();
- __asm__ ("hlt");
+ __asm __volatile("hlt");
}
}
}
@@ -1022,7 +1023,8 @@ static void cpu_idle_register(void *junk)
{
EVENTHANDLER_FAST_REGISTER(idle_event, cpu_idle, NULL, IDLE_PRI_LAST);
}
-SYSINIT(cpu_idle_register, SI_SUB_SCHED_IDLE, SI_ORDER_SECOND, cpu_idle_register, NULL)
+SYSINIT(cpu_idle_register, SI_SUB_SCHED_IDLE, SI_ORDER_SECOND,
+ cpu_idle_register, NULL)
#endif /* !SMP */
/*
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 7055010..b334617 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@@ -96,7 +97,6 @@
#include <machine/clock.h>
#include <machine/specialreg.h>
#include <machine/bootinfo.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/mutex.h>
#include <machine/pc/bios.h>
@@ -996,7 +996,8 @@ cpu_halt(void)
*/
#ifndef SMP
static int cpu_idle_hlt = 1;
-SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable");
+SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
+ &cpu_idle_hlt, 0, "Idle loop HLT enable");
/*
* Note that we have to be careful here to avoid a race between checking
@@ -1007,13 +1008,13 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle
static void
cpu_idle(void *junk, int count)
{
- if (cpu_idle_hlt){
+ if (cpu_idle_hlt) {
disable_intr();
- if (procrunnable()) {
+ if (procrunnable())
enable_intr();
- } else {
+ else {
enable_intr();
- __asm__ ("hlt");
+ __asm __volatile("hlt");
}
}
}
@@ -1022,7 +1023,8 @@ static void cpu_idle_register(void *junk)
{
EVENTHANDLER_FAST_REGISTER(idle_event, cpu_idle, NULL, IDLE_PRI_LAST);
}
-SYSINIT(cpu_idle_register, SI_SUB_SCHED_IDLE, SI_ORDER_SECOND, cpu_idle_register, NULL)
+SYSINIT(cpu_idle_register, SI_SUB_SCHED_IDLE, SI_ORDER_SECOND,
+ cpu_idle_register, NULL)
#endif /* !SMP */
/*
OpenPOWER on IntegriCloud