summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2020-06-17 14:12:19 +0000
committervisa <visa@openbsd.org>2020-06-17 14:12:19 +0000
commita48e7c78d68d0c60650e94e53b13f240fd0df7d1 (patch)
tree184e961a6bf8e0e6788b49ddc40d3e0fbb9fbe37 /sys
parentddb(4); be explicit that the parameter to trace /t uses the radix (diff)
downloadwireguard-openbsd-a48e7c78d68d0c60650e94e53b13f240fd0df7d1.tar.xz
wireguard-openbsd-a48e7c78d68d0c60650e94e53b13f240fd0df7d1.zip
Expose SMR list and pointer macros to userspace. This enables the use
of SMR lists in userspace-visible parts of system headers. In addition, the macros allow libkvm to examine SMR data structures. Initial diff by and OK claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/smr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/smr.h b/sys/sys/smr.h
index 1ca42e0ca4e..b15689abc3f 100644
--- a/sys/sys/smr.h
+++ b/sys/sys/smr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smr.h,v 1.6 2020/04/12 07:20:33 visa Exp $ */
+/* $OpenBSD: smr.h,v 1.7 2020/06/17 14:12:19 visa Exp $ */
/*
* Copyright (c) 2019 Visa Hankala
@@ -67,6 +67,8 @@ smr_init(struct smr_entry *smr)
#define SMR_ASSERT_NONCRITICAL() do {} while (0)
#endif
+#endif /* _KERNEL */
+
#define SMR_PTR_GET(pptr) READ_ONCE(*pptr)
#define SMR_PTR_GET_LOCKED(pptr) (*(pptr))
@@ -435,6 +437,4 @@ struct { \
* any concurrent readers to proceed iteration. */ \
} while (0)
-#endif /* _KERNEL */
-
#endif /* !_SYS_SMR_ */