summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/globals.h
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-08-20 21:29:16 +0000
committerobrien <obrien@FreeBSD.org>2001-08-20 21:29:16 +0000
commit355b16412ac98cbf56f3465797c1295331997d35 (patch)
treef61373350613d9b04195e87c0fc975e5369e2552 /sys/sparc64/include/globals.h
parent13444b820b77541cb2a313742b8a9c360eb2ea67 (diff)
downloadFreeBSD-src-355b16412ac98cbf56f3465797c1295331997d35.zip
FreeBSD-src-355b16412ac98cbf56f3465797c1295331997d35.tar.gz
Sync globals.h up with the other platforms. There is still some cruft in
here, but now all the platforms have the same cruft. Consistantly spell the `struct globaldata *' "globalp". Reviewed by: peter
Diffstat (limited to 'sys/sparc64/include/globals.h')
-rw-r--r--sys/sparc64/include/globals.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/sparc64/include/globals.h b/sys/sparc64/include/globals.h
index 820c846..01d48a8 100644
--- a/sys/sparc64/include/globals.h
+++ b/sys/sparc64/include/globals.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Jake Burkholder.
+ * Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,19 +30,20 @@
#define _MACHINE_GLOBALS_H_
#ifdef _KERNEL
-
#include <machine/globaldata.h>
-register struct globaldata *globaldata __asm("%g7");
+register struct globaldata *globalp __asm__("%g7");
-#define PCPU_GET(name) (globaldata->gd_ ## name)
-#define PCPU_PTR(name) (&globaldata->gd_ ## name)
-#define PCPU_SET(name, value) (globaldata->gd_ ## name = (value))
+#define GLOBALP globalp
+
+#define PCPU_GET(member) (GLOBALP->gd_ ## member)
+#define PCPU_PTR(member) (&GLOBALP->gd_ ## member)
+#define PCPU_SET(member,value) (GLOBALP->gd_ ## member = (value))
-#define curproc PCPU_GET(curproc)
#define CURPROC PCPU_GET(curproc)
-#define CURTHD PCPU_GET(curproc)
+#define CURTHD PCPU_GET(curproc) /* temporary */
+#define curproc PCPU_GET(curproc)
-#endif /* _KERNEL */
+#endif /* _KERNEL */
-#endif /* !_MACHINE_GLOBALS_H_ */
+#endif /* !_MACHINE_GLOBALS_H_ */
OpenPOWER on IntegriCloud