summaryrefslogtreecommitdiff
path: root/kern/macros.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-22 23:57:51 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-22 23:57:51 +0200
commit49f414edfa049023b5f68f272a1f2e512be4a598 (patch)
tree5a10faebffc3914c931fced056bc85e1257a9f79 /kern/macros.h
parent71b302e2c41f7bfb92beda8961a6d57bef2bd14e (diff)
kern/macros: move the __read_mostly macro here
Diffstat (limited to 'kern/macros.h')
-rw-r--r--kern/macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kern/macros.h b/kern/macros.h
index 8f0d10ca..63ded053 100644
--- a/kern/macros.h
+++ b/kern/macros.h
@@ -25,6 +25,11 @@
#include <stddef.h>
#endif /* __ASSEMBLER__ */
+/*
+ * Attributes for variables that are mostly read and seldom changed.
+ */
+#define __read_mostly __section(".data.read_mostly")
+
#define MACRO_BEGIN ({
#define MACRO_END })