Module Name: src Committed By: thorpej Date: Fri Sep 4 00:36:07 UTC 2020
Modified Files: src/sys/sys: timetc.h Log Message: Allow ths file to be included by a _KMEMUSER. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/sys/timetc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/timetc.h diff -u src/sys/sys/timetc.h:1.8 src/sys/sys/timetc.h:1.9 --- src/sys/sys/timetc.h:1.8 Fri May 29 05:29:23 2020 +++ src/sys/sys/timetc.h Fri Sep 4 00:36:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: timetc.h,v 1.8 2020/05/29 05:29:23 rin Exp $ */ +/* $NetBSD: timetc.h,v 1.9 2020/09/04 00:36:07 thorpej Exp $ */ /*- * ---------------------------------------------------------------------------- @@ -14,7 +14,7 @@ #ifndef _SYS_TIMETC_H_ #define _SYS_TIMETC_H_ -#ifndef _KERNEL +#if !defined(_KERNEL) && !defined(_KMEMUSER) #error "no user-serviceable parts inside" #endif @@ -77,6 +77,7 @@ struct timecounter { /* Pointer to the next timecounter. */ }; +#ifdef _KERNEL extern struct timecounter *timecounter; uint64_t tc_getfrequency(void); @@ -89,5 +90,6 @@ void tc_gonebad(struct timecounter *); #ifdef SYSCTL_DECL SYSCTL_DECL(_kern_timecounter); #endif +#endif /* _KERNEL */ #endif /* !_SYS_TIMETC_H_ */