Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/sys Pull up following revision(s) (requested by pgoye...
details: https://anonhg.NetBSD.org/src/rev/870a7b7ac40d
branches: netbsd-8
changeset: 434337:870a7b7ac40d
user: snj <snj%NetBSD.org@localhost>
date: Fri Oct 13 08:14:51 2017 +0000
description:
Pull up following revision(s) (requested by pgoyette in ticket #301):
sys/sys/kernhist.h: revision 1.19-1.20
Call sysctl_kernhist_new for KERNHIST_LINK_STATIC. I can get usbhist
from vmstat(1) again.
--
Use do {...} while 0; construct for KERNHIST_LINK_STATIC()
NFCI
diffstat:
sys/sys/kernhist.h | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (50 lines):
diff -r 24c86f7f9af6 -r 870a7b7ac40d sys/sys/kernhist.h
--- a/sys/sys/kernhist.h Wed Oct 11 22:55:18 2017 +0000
+++ b/sys/sys/kernhist.h Fri Oct 13 08:14:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernhist.h,v 1.18 2017/01/10 00:50:57 pgoyette Exp $ */
+/* $NetBSD: kernhist.h,v 1.18.8.1 2017/10/13 08:14:51 snj Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -147,6 +147,12 @@
#define KERNHIST_DECL(NAME) extern struct kern_history NAME
#define KERNHIST_DEFINE(NAME) struct kern_history NAME
+#define KERNHIST_LINK_STATIC(NAME) \
+do { \
+ LIST_INSERT_HEAD(&kern_histories, &(NAME), list); \
+ sysctl_kernhist_new(&(NAME)); \
+} while (/*CONSTCOND*/ 0)
+
#define KERNHIST_INIT(NAME,N) \
do { \
(NAME).name = __STRING(NAME); \
@@ -156,8 +162,7 @@
(NAME).e = (struct kern_history_ent *) \
kmem_zalloc(sizeof(struct kern_history_ent) * (N), KM_SLEEP); \
(NAME).s = 0; \
- LIST_INSERT_HEAD(&kern_histories, &(NAME), list); \
- sysctl_kernhist_new(&(NAME)); \
+ KERNHIST_LINK_STATIC(NAME); \
} while (/*CONSTCOND*/ 0)
#define KERNHIST_INITIALIZER(NAME,BUF) \
@@ -171,9 +176,6 @@
/* BUF will inititalized to zeroes by being in .bss */ \
}
-#define KERNHIST_LINK_STATIC(NAME) \
- LIST_INSERT_HEAD(&kern_histories, &(NAME), list)
-
#define KERNHIST_INIT_STATIC(NAME,BUF) \
do { \
(NAME).name = __STRING(NAME); \
@@ -184,7 +186,6 @@
(NAME).s = 0; \
memset((NAME).e, 0, sizeof(struct kern_history_ent) * (NAME).n); \
KERNHIST_LINK_STATIC(NAME); \
- sysctl_kernhist_new(&(NAME)); \
} while (/*CONSTCOND*/ 0)
#ifndef KERNHIST_DELAY
Home |
Main Index |
Thread Index |
Old Index