Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Allow ths file to be included by a _KMEMUSER.



details:   https://anonhg.NetBSD.org/src/rev/43e208c5f2c8
branches:  trunk
changeset: 938192:43e208c5f2c8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Sep 04 00:36:07 2020 +0000

description:
Allow ths file to be included by a _KMEMUSER.

diffstat:

 sys/sys/timetc.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 9978738420f7 -r 43e208c5f2c8 sys/sys/timetc.h
--- a/sys/sys/timetc.h  Thu Sep 03 22:56:11 2020 +0000
+++ b/sys/sys/timetc.h  Fri Sep 04 00:36:07 2020 +0000
@@ -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 @@
                /* Pointer to the next timecounter. */
 };
 
+#ifdef _KERNEL
 extern struct timecounter *timecounter;
 
 uint64_t tc_getfrequency(void);
@@ -89,5 +90,6 @@
 #ifdef SYSCTL_DECL
 SYSCTL_DECL(_kern_timecounter);
 #endif
+#endif /* _KERNEL */
 
 #endif /* !_SYS_TIMETC_H_ */



Home | Main Index | Thread Index | Old Index