From d90774443d556bbfad2e78eaba79c93230484234 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 19 Aug 2008 19:53:52 +0000 Subject: Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data. MFC after: 1 week --- sys/mips/include/pcpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/mips') diff --git a/sys/mips/include/pcpu.h b/sys/mips/include/pcpu.h index fb2951b..5fe2b22 100644 --- a/sys/mips/include/pcpu.h +++ b/sys/mips/include/pcpu.h @@ -31,9 +31,8 @@ #ifndef _MACHINE_PCPU_H_ #define _MACHINE_PCPU_H_ -#ifdef _KERNEL - #include + #define PCPU_MD_FIELDS \ pd_entry_t *pc_segbase; /* curthread segbase */ \ struct pmap *pc_curpmap; /* pmap of curthread */ \ @@ -42,6 +41,8 @@ u_int pc_pending_ipis; /* the IPIs pending to this CPU */ \ void *pc_boot_stack; +#ifdef _KERNEL + #ifdef SMP static __inline struct pcpu* get_pcpup(void) -- cgit v1.1