From 004998bc66c164ec5f42660176189bc10287f4f4 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 20 Aug 2002 19:50:30 +0000 Subject: [PATCH] Whitespace and style fixes. Submitted by: bde --- sys/sys/pcpu.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index ab5a9d3ac158..84e89efcce81 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 #include #include -#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_ */