diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-10-23 18:36:03 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-10-23 18:36:03 +0000 |
commit | 1371d7ded97743f76757f169ff5992f7288542e3 (patch) | |
tree | ac7bc86598169995054e57de31a9ac5da0e2807d | |
parent | 5ca524e01452f4ccb05cf0a45382f05560ae96b9 (diff) | |
download | FreeBSD-src-1371d7ded97743f76757f169ff5992f7288542e3.zip FreeBSD-src-1371d7ded97743f76757f169ff5992f7288542e3.tar.gz |
Move bogus proc reference stuff into <machine/globals.h>. There is no
more include file including <sys/proc.h>, but there still is this wonky
and (causes warnings on i386) reference in globals.h.
CURTHD is now defined in <machine/globals.h> as well. The correct thing
to do is provide a platform function for this.
-rw-r--r-- | sys/alpha/include/globals.h | 2 | ||||
-rw-r--r-- | sys/i386/include/globals.h | 5 | ||||
-rw-r--r-- | sys/powerpc/include/globals.h | 2 | ||||
-rw-r--r-- | sys/sys/mutex.h | 8 |
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); |