diff options
author | obrien <obrien@FreeBSD.org> | 2001-08-16 09:29:35 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-08-16 09:29:35 +0000 |
commit | 358f773cec56d6c2efccc594d09099db6ac1665e (patch) | |
tree | fa94197a35ffa007a11c5f91059188205d6476e5 /sys/i386 | |
parent | 6bf1068b6ed1b605de9e06f71dd10f0d8398e421 (diff) | |
download | FreeBSD-src-358f773cec56d6c2efccc594d09099db6ac1665e.zip FreeBSD-src-358f773cec56d6c2efccc594d09099db6ac1665e.tar.gz |
style(9) and make consistent across platforms
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/globaldata.h | 46 | ||||
-rw-r--r-- | sys/i386/include/pcpu.h | 46 |
2 files changed, 48 insertions, 44 deletions
diff --git a/sys/i386/include/globaldata.h b/sys/i386/include/globaldata.h index ef82a66..cda7b1e 100644 --- a/sys/i386/include/globaldata.h +++ b/sys/i386/include/globaldata.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_ */ diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h index ef82a66..cda7b1e 100644 --- a/sys/i386/include/pcpu.h +++ b/sys/i386/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_ */ |