Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/sys/dev/pad Add 'struct localcount' for modula...
details: https://anonhg.NetBSD.org/src/rev/b0b50ad8fac9
branches: pgoyette-localcount
changeset: 852814:b0b50ad8fac9
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Jul 18 11:12:11 2016 +0000
description:
Add 'struct localcount' for modular builds
diffstat:
sys/dev/pad/pad.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 445846b3b89d -r b0b50ad8fac9 sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Mon Jul 18 06:58:44 2016 +0000
+++ b/sys/dev/pad/pad.c Mon Jul 18 11:12:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.25 2016/07/07 06:55:41 msaitoh Exp $ */
+/* $NetBSD: pad.c,v 1.25.2.1 2016/07/18 11:12:11 pgoyette Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.25 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.25.2.1 2016/07/18 11:12:11 pgoyette Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -44,6 +44,7 @@
#include <sys/module.h>
#include <sys/atomic.h>
#include <sys/time.h>
+#include <sys/localcount.h>
#include <dev/audio_if.h>
#include <dev/audiovar.h>
@@ -129,6 +130,10 @@
dev_type_close(pad_close);
dev_type_read(pad_read);
+#ifdef _MODULE
+struct localcount pad_localcount;
+#endif
+
const struct cdevsw pad_cdevsw = {
.d_open = pad_open,
.d_close = pad_close,
@@ -141,6 +146,9 @@
.d_mmap = nommap,
.d_kqfilter = nokqfilter,
.d_discard = nodiscard,
+#ifdef _MODULE
+ .d_localcount = &pad_cdevsw,
+#endif
.d_flag = D_OTHER | D_MPSAFE,
};
Home |
Main Index |
Thread Index |
Old Index