aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/include/globaldata.h
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-01-06 19:55:42 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-01-06 19:55:42 +0000
commitf8761e53a729bc1d12a112da8a474ea995e76975 (patch)
treeec219c93b1e52eb517098b8f64462577d09780d5 /sys/i386/include/globaldata.h
parent12e275aaeeeff2ab8a4daca4f115b75b69e79ba0 (diff)
Implement accessors for per-cpu variables which don't depend on the
symbols in globals.s. PCPU_GET(name) returns the value of the per-cpu variable PCPU_PTR(name) returns a pointer to the per-cpu variable PCPU_SET(name, val) sets the value of the per-cpu variable In general these are not yet used, compatibility macros remain. Unifdef SMP struct globaldata, this makes variables such as cpuid available for UP as well. Rebuilding modules is probably a good idea, but I believe old modules will still work, as most of the old infrastructure remains.
Notes
Notes: svn path=/head/; revision=70723
Diffstat (limited to 'sys/i386/include/globaldata.h')
-rw-r--r--sys/i386/include/globaldata.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/i386/include/globaldata.h b/sys/i386/include/globaldata.h
index 90c3bd733df2..173cb08264d0 100644
--- a/sys/i386/include/globaldata.h
+++ b/sys/i386/include/globaldata.h
@@ -61,11 +61,11 @@ struct globaldata {
struct timeval gd_switchtime;
struct i386tss gd_common_tss;
int gd_switchticks;
- int gd_intr_nesting_level;
+ u_char gd_intr_nesting_level;
+ u_char gd_pad0[3];
struct segment_descriptor gd_common_tssd;
struct segment_descriptor *gd_tss_gdt;
int gd_currentldt; /* only used for USER_LDT */
-#ifdef SMP
u_int gd_cpuid;
u_int gd_cpu_lockid;
u_int gd_other_cpus;
@@ -79,7 +79,6 @@ struct globaldata {
caddr_t gd_prv_CADDR2;
caddr_t gd_prv_CADDR3;
unsigned *gd_prv_PADDR1;
-#endif
u_int gd_astpending;
SLIST_ENTRY(globaldata) gd_allcpu;
int gd_witness_spin_check;