diff options
author | jhb <jhb@FreeBSD.org> | 2008-08-19 19:53:52 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-08-19 19:53:52 +0000 |
commit | d90774443d556bbfad2e78eaba79c93230484234 (patch) | |
tree | 54a78b309ff5605f1b1c38a78d05a129df9f9940 /sys/sys/pcpu.h | |
parent | 6c10b95f591e34da2c498e8f2bccb35a4219ef75 (diff) | |
download | FreeBSD-src-d90774443d556bbfad2e78eaba79c93230484234.zip FreeBSD-src-d90774443d556bbfad2e78eaba79c93230484234.tar.gz |
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
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r-- | sys/sys/pcpu.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index df73985..5633bf0 100644 --- a/sys/sys/pcpu.h +++ b/sys/sys/pcpu.h @@ -33,10 +33,6 @@ #ifndef _SYS_PCPU_H_ #define _SYS_PCPU_H_ -#ifndef _KERNEL -#error "no user-serviceable parts inside" -#endif - #ifdef LOCORE #error "no assembler-serviceable parts inside" #endif @@ -106,6 +102,8 @@ struct pcpu { PCPU_MD_FIELDS; }; +#ifdef _KERNEL + SLIST_HEAD(cpuhead, pcpu); extern struct cpuhead cpuhead; @@ -133,4 +131,6 @@ void pcpu_destroy(struct pcpu *pcpu); struct pcpu *pcpu_find(u_int cpuid); void pcpu_init(struct pcpu *pcpu, int cpuid, size_t size); +#endif /* _KERNEL */ + #endif /* !_SYS_PCPU_H_ */ |