aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/pcpu.h
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-08-16 09:29:35 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-08-16 09:29:35 +0000
commit589278dbaeaa80850097b35d25e4f3f9ba0c6921 (patch)
treefa94197a35ffa007a11c5f91059188205d6476e5 /sys/amd64/include/pcpu.h
parentcc00d33c5f2c5fea29688498ea21c202c07e3881 (diff)
downloadsrc-589278dbaeaa80850097b35d25e4f3f9ba0c6921.tar.gz
src-589278dbaeaa80850097b35d25e4f3f9ba0c6921.zip
style(9) and make consistent across platforms
Notes
Notes: svn path=/head/; revision=81763
Diffstat (limited to 'sys/amd64/include/pcpu.h')
-rw-r--r--sys/amd64/include/pcpu.h46
1 files changed, 24 insertions, 22 deletions
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index ef82a6682b41..cda7b1e172e2 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -29,6 +29,8 @@
#ifndef _MACHINE_GLOBALDATA_H_
#define _MACHINE_GLOBALDATA_H_
+#ifdef _KERNEL
+
#include <machine/segments.h>
#include <machine/tss.h>
@@ -50,27 +52,25 @@
* other processors"
*/
struct globaldata {
- struct globaldata *gd_prvspace; /* self-reference */
- struct proc *gd_curproc;
- struct proc *gd_npxproc;
- struct pcb *gd_curpcb;
- struct proc *gd_idleproc;
- struct timeval gd_switchtime;
- struct i386tss gd_common_tss;
- int gd_switchticks;
- struct segment_descriptor gd_common_tssd;
- struct segment_descriptor *gd_tss_gdt;
- int gd_currentldt;
- u_int gd_cpuid;
- u_int gd_other_cpus;
+ struct globaldata *gd_prvspace; /* self-reference */
+ struct proc *gd_curproc; /* current process */
+ struct proc *gd_idleproc; /* idle process */
+ struct proc *gd_npxproc;
+ struct pcb *gd_curpcb; /* current pcb */
+ struct timeval gd_switchtime;
+ struct i386tss gd_common_tss;
+ int gd_switchticks;
+ struct segment_descriptor gd_common_tssd;
+ struct segment_descriptor *gd_tss_gdt;
+ int gd_currentldt;
+ u_int gd_cpuid; /* this cpu number */
+ u_int gd_other_cpus; /* all other cpus */
SLIST_ENTRY(globaldata) gd_allcpu;
- struct lock_list_entry *gd_spinlocks;
+ struct lock_list_entry *gd_spinlocks;
#ifdef KTR_PERCPU
-#ifdef KTR
- volatile int gd_ktr_idx;
- char *gd_ktr_buf;
- char gd_ktr_buf_data[KTR_SIZE];
-#endif
+ volatile int gd_ktr_idx; /* Index into trace table */
+ char *gd_ktr_buf;
+ char gd_ktr_buf_data[KTR_SIZE];
#endif
};
@@ -82,11 +82,11 @@ struct globaldata {
*/
struct privatespace {
/* page 0 - data page */
- struct globaldata globaldata;
- char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
+ struct globaldata globaldata;
+ char __filler0[PAGE_SIZE - sizeof(struct globaldata)];
/* page 1 - idle stack (UPAGES pages) */
- char idlestack[UPAGES * PAGE_SIZE];
+ char idlestack[UPAGES * PAGE_SIZE];
/* page 1+UPAGES... */
};
@@ -94,4 +94,6 @@ extern struct privatespace SMP_prvspace[];
#endif
+#endif /* _KERNEL */
+
#endif /* ! _MACHINE_GLOBALDATA_H_ */