Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Protect a few forward declarations for kernel only u...



details:   https://anonhg.NetBSD.org/src/rev/4a996d956390
branches:  trunk
changeset: 342858:4a996d956390
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 11 08:40:52 2016 +0000

description:
Protect a few forward declarations for kernel only use, as suggested
by ryoon@

diffstat:

 sys/sys/buf.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r ff3d9b71543c -r 4a996d956390 sys/sys/buf.h
--- a/sys/sys/buf.h     Mon Jan 11 08:14:08 2016 +0000
+++ b/sys/sys/buf.h     Mon Jan 11 08:40:52 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.124 2016/01/11 01:22:36 dholland Exp $ */
+/*     $NetBSD: buf.h,v 1.125 2016/01/11 08:40:52 martin Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -88,7 +88,9 @@
 extern kmutex_t bufcache_lock;
 extern kmutex_t buffer_lock;
 
+#if defined(_KERNEL)
 extern void (*biodone_vfs)(buf_t *);
+#endif
 
 /*
  * The buffer header describes an I/O operation in the kernel.
@@ -105,7 +107,9 @@
  */
 
 /* required for the conditional union member below to be ~safe */
+#if defined(_KERNEL)
 __CTASSERT(sizeof(struct work) <= sizeof(TAILQ_ENTRY(buf)));
+#endif
 
 struct buf {
        union {



Home | Main Index | Thread Index | Old Index