diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index e7bc3aa33af4..7a6ef580b9d1 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.55 2008/05/11 15:32:20 ad Exp $ */ +/* $NetBSD: cpu.h,v 1.56 2008/05/11 16:57:43 ad Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,6 +39,8 @@ #include +#ifdef _KERNEL + #if defined(__GNUC__) && !defined(_LKM) static struct cpu_info *x86_curcpu(void); static lwp_t *x86_curlwp(void); @@ -85,4 +87,6 @@ cpu_set_curpri(int pri) #define CLKF_INTR(frame) (curcpu()->ci_idepth > 0) #define LWP_PC(l) ((l)->l_md.md_regs->tf_rip) +#endif /* _KERNEL */ + #endif /* !_AMD64_CPU_H_ */ diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index 399faa172d41..1a7833f0381f 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.173 2008/05/11 15:32:20 ad Exp $ */ +/* $NetBSD: cpu.h,v 1.174 2008/05/11 16:57:43 ad Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,6 +39,8 @@ #include +#ifdef _KERNEL + #if defined(__GNUC__) && !defined(_LKM) static struct cpu_info *x86_curcpu(void); static lwp_t *x86_curlwp(void); @@ -83,4 +85,6 @@ cpu_set_curpri(int pri) #define CLKF_INTR(frame) (curcpu()->ci_idepth > 0) #define LWP_PC(l) ((l)->l_md.md_regs->tf_eip) +#endif /* _KERNEL */ + #endif /* !_I386_CPU_H_ */