svn commit: r252326 - stable/9/sys/sys
Lawrence Stewart
lstewart at FreeBSD.org
Fri Jun 28 03:22:43 UTC 2013
Author: lstewart
Date: Fri Jun 28 03:22:43 2013
New Revision: 252326
URL: http://svnweb.freebsd.org/changeset/base/252326
Log:
MFC r251682:
Remove some duplicate code by making KHELP_DECLARE_MOD() a wrapper around
KHELP_DECLARE_MOD_UMA().
Modified:
stable/9/sys/sys/module_khelp.h
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/sys/ (props changed)
Modified: stable/9/sys/sys/module_khelp.h
==============================================================================
--- stable/9/sys/sys/module_khelp.h Fri Jun 28 03:14:40 2013 (r252325)
+++ stable/9/sys/sys/module_khelp.h Fri Jun 28 03:22:43 2013 (r252326)
@@ -70,22 +70,6 @@ struct khelp_modevent_data {
uma_dtor umadtor;
};
-#define KHELP_DECLARE_MOD(hname, hdata, hhooks, version) \
- static struct khelp_modevent_data kmd_##hname = { \
- .name = #hname, \
- .helper = hdata \
- .hooks = hhooks, \
- .nhooks = sizeof(hhooks) / sizeof(hhooks[0]), \
- }; \
- static moduledata_t h_##hname = { \
- .name = #hname, \
- .evhand = khelp_modevent, \
- .priv = &kmd_##hname \
- }; \
- DECLARE_MODULE(hname, h_##hname, SI_SUB_PROTO_IFATTACHDOMAIN, \
- SI_ORDER_ANY); \
- MODULE_VERSION(hname, version)
-
#define KHELP_DECLARE_MOD_UMA(hname, hdata, hhooks, version, size, ctor, dtor) \
static struct khelp_modevent_data kmd_##hname = { \
.name = #hname, \
@@ -105,6 +89,9 @@ struct khelp_modevent_data {
SI_ORDER_ANY); \
MODULE_VERSION(hname, version)
+#define KHELP_DECLARE_MOD(hname, hdata, hhooks, version) \
+ KHELP_DECLARE_MOD_UMA(hname, hdata, hhooks, version, 0, NULL, NULL)
+
int khelp_modevent(module_t mod, int type, void *data);
#endif /* _SYS_MODULE_KHELP_H_ */
More information about the svn-src-stable-9
mailing list