diff options
author | jake <jake@FreeBSD.org> | 2001-01-06 19:55:42 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-01-06 19:55:42 +0000 |
commit | d20b7bdad1cabae99d52383ab00b455a70558e62 (patch) | |
tree | b710edcc4a8e3ce6504713a7a74b941215c93632 /sys/alpha/include | |
parent | da015457f35732efc397d429bd0d118dd5c5661a (diff) | |
download | FreeBSD-src-d20b7bdad1cabae99d52383ab00b455a70558e62.zip FreeBSD-src-d20b7bdad1cabae99d52383ab00b455a70558e62.tar.gz |
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.
Diffstat (limited to 'sys/alpha/include')
-rw-r--r-- | sys/alpha/include/globals.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/alpha/include/globals.h b/sys/alpha/include/globals.h index 970ef68..85fcad3 100644 --- a/sys/alpha/include/globals.h +++ b/sys/alpha/include/globals.h @@ -41,6 +41,7 @@ register struct globaldata *globalp __asm__("$8"); #endif #define PCPU_GET(name) (GLOBALP->gd_##name) +#define PCPU_PTR(name) (&GLOBALP->gd_##name) #define PCPU_SET(name,value) (GLOBALP->gd_##name = (value)) /* |