summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-08-20 19:50:30 +0000
committerjhb <jhb@FreeBSD.org>2002-08-20 19:50:30 +0000
commitcf26d9462f392ebb953d4eb410f08d841729c020 (patch)
treea1e66d649b7e712eb3dd0ec8f7aa32bd0a1a3a09
parent7d088294874c6d105f26c7da821724d08d058ff8 (diff)
downloadFreeBSD-src-cf26d9462f392ebb953d4eb410f08d841729c020.zip
FreeBSD-src-cf26d9462f392ebb953d4eb410f08d841729c020.tar.gz
Whitespace and style fixes.
Submitted by: bde
-rw-r--r--sys/sys/pcpu.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index ab5a9d3..84e89efc 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -31,15 +31,20 @@
*/
#ifndef _SYS_PCPU_H_
-#define _SYS_PCPU_H_
+#define _SYS_PCPU_H_
+
+#ifndef _KERNEL
+#error "no user-serviceable parts inside"
+#endif
+
+#ifdef LOCORE
+#error "no assembler-serviceable parts inside"
+#endif
-#ifdef _KERNEL
#include <sys/queue.h>
#include <sys/vmmeter.h>
#include <machine/pcpu.h>
-#ifndef LOCORE
-
struct pcb;
struct thread;
@@ -73,21 +78,21 @@ SLIST_HEAD(cpuhead, pcpu);
extern struct cpuhead cpuhead;
-#define curthread PCPU_GET(curthread)
#define CURPROC (curthread->td_proc)
-#define curproc (curthread->td_proc)
-#define curksegrp (curthread->td_ksegrp)
#define curkse (curthread->td_kse)
+#define curksegrp (curthread->td_ksegrp)
+#define curproc (curthread->td_proc)
+#define curthread PCPU_GET(curthread)
/*
* MI PCPU support functions
*
* PCPU_LAZY_INC() - Lazily increment a per-cpu stats counter, without
- * guarenteeing atomicy or even necessarily consistency.
+ * guarenteeing atomicity or even necessarily consistency.
*
* XXX we need to create MD primitives to support
* this to guarentee at least some level of consistency,
- * i.e. to prevent us from totally corrupting the
+ * i.e., to prevent us from totally corrupting the
* counters due to preemption in a multi-instruction
* increment sequence for architectures that do not
* support single-instruction memory increments.
@@ -107,6 +112,4 @@ void pcpu_destroy(struct pcpu *pcpu);
struct pcpu *pcpu_find(u_int cpuid);
void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size);
-#endif /* !LOCORE */
-#endif /* _KERNEL */
-#endif /* _SYS_PCPU_H_ */
+#endif /* !_SYS_PCPU_H_ */
OpenPOWER on IntegriCloud