aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/module.h
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-07-02 19:48:38 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-07-02 19:48:38 +0000
commitf4b3640475cec9299517289b7e8731ae26997cfc (patch)
treed5b84addce62cd31c3c05506a6f5b3f405f53c90 /sys/sys/module.h
parent0479387e0ae72132bd249ae4b334d298275f06fa (diff)
downloadsrc-f4b3640475cec9299517289b7e8731ae26997cfc.tar.gz
src-f4b3640475cec9299517289b7e8731ae26997cfc.zip
inline atomics and allow tied modules to inline locks
- inline atomics in modules on i386 and amd64 (they were always inline on other arches) - allow modules to opt in to inlining locks by specifying MODULE_TIED=1 in the makefile Reviewed by: kib Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16079
Notes
Notes: svn path=/head/; revision=335873
Diffstat (limited to 'sys/sys/module.h')
-rw-r--r--sys/sys/module.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h
index 6799b179b8fc..b40870d32941 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -146,8 +146,13 @@ struct mod_pnp_match_info
SYSINIT(name##module, sub, order, module_register_init, &data); \
struct __hack
+#ifdef KLD_TIED
#define DECLARE_MODULE(name, data, sub, order) \
+ DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, __FreeBSD_version)
+#else
+#define DECLARE_MODULE(name, data, sub, order) \
DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, MODULE_KERNEL_MAXVER)
+#endif
/*
* The module declared with DECLARE_MODULE_TIED can only be loaded