summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/include/globals.h2
-rw-r--r--sys/i386/include/globals.h5
-rw-r--r--sys/powerpc/include/globals.h2
-rw-r--r--sys/sys/mutex.h8
4 files changed, 9 insertions, 8 deletions
diff --git a/sys/alpha/include/globals.h b/sys/alpha/include/globals.h
index f85a67c..b9e75fc 100644
--- a/sys/alpha/include/globals.h
+++ b/sys/alpha/include/globals.h
@@ -30,6 +30,7 @@
#define _MACHINE_GLOBALS_H_
#ifdef _KERNEL
+#include <machine/globaldata.h>
register struct globaldata *globalp __asm__("$8");
@@ -49,6 +50,7 @@ register struct globaldata *globalp __asm__("$8");
* portability between UP and SMP kernels.
*/
#define CURPROC PCPU_GET(curproc)
+#define CURTHD PCPU_GET(curproc) /* temporary */
#define curproc PCPU_GET(curproc)
#define idleproc PCPU_GET(idleproc)
#define curpcb PCPU_GET(curpcb)
diff --git a/sys/i386/include/globals.h b/sys/i386/include/globals.h
index c0f0dd7..b7b7932 100644
--- a/sys/i386/include/globals.h
+++ b/sys/i386/include/globals.h
@@ -174,6 +174,11 @@ GLOBAL_FUNC(witness_spin_check)
#define GLOBALDATA (&globaldata)
#endif
+#ifndef curproc
+struct proc;
+extern struct proc *curproc;
+#endif
+#define CURTHD curproc
#define CURPROC curproc
#define PCPU_SET(name, value) (_global_##name##_set((int)value))
diff --git a/sys/powerpc/include/globals.h b/sys/powerpc/include/globals.h
index f85a67c..b9e75fc 100644
--- a/sys/powerpc/include/globals.h
+++ b/sys/powerpc/include/globals.h
@@ -30,6 +30,7 @@
#define _MACHINE_GLOBALS_H_
#ifdef _KERNEL
+#include <machine/globaldata.h>
register struct globaldata *globalp __asm__("$8");
@@ -49,6 +50,7 @@ register struct globaldata *globalp __asm__("$8");
* portability between UP and SMP kernels.
*/
#define CURPROC PCPU_GET(curproc)
+#define CURTHD PCPU_GET(curproc) /* temporary */
#define curproc PCPU_GET(curproc)
#define idleproc PCPU_GET(idleproc)
#define curpcb PCPU_GET(curpcb)
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 54d4088..1ff8d35 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -41,11 +41,6 @@
#include <machine/bus.h>
#include <machine/cpufunc.h>
#include <machine/globals.h>
-#include <sys/proc.h> /* Needed for curproc. */
-#ifndef curproc
-struct proc;
-extern struct proc *curproc;
-#endif
#endif /* _KERNEL_ */
#endif /* !LOCORE */
@@ -138,9 +133,6 @@ struct mtx {
#define mp_fixme(string)
#ifdef _KERNEL
-/* Misc */
-#define CURTHD CURPROC /* Current thread ID */
-
/* Prototypes */
void mtx_init(struct mtx *m, const char *description, int flag);
void mtx_enter_hard(struct mtx *, int type, int saveintr);
OpenPOWER on IntegriCloud