aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2023-05-24 17:05:03 +0000
committerMark Johnston <markj@FreeBSD.org>2023-05-26 19:38:08 +0000
commit44866dfb44178c86b6f380eb713a8f07c3d3b566 (patch)
tree982aa31a2d79f270431e403ae38b1a9a29792c8a
parente96ed177465ee59fcc43dd0696106e5342e28c27 (diff)
downloadsrc-44866dfb44178c86b6f380eb713a8f07c3d3b566.tar.gz
src-44866dfb44178c86b6f380eb713a8f07c3d3b566.zip
bitset: Remove BITSET_FOREACH_ADVANCE
__BITSET_FOREACH_ADVANCE is a helper macro for __BITSET_FOREACH_IS(SET|CLR) and wasn't meant to be used directly by consumers. While here, fix some whitespace and move a comment back to where it belongs. Fixes: 5e04571cf3cf ("sys/bitset.h: reduce visibility of BIT_* macros") MFC after: 1 week
-rw-r--r--sys/sys/bitset.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h
index ca6dd4590e89..a6e504e7f3b3 100644
--- a/sys/sys/bitset.h
+++ b/sys/sys/bitset.h
@@ -309,9 +309,6 @@
#define __BITSET_SIZE(_s) (__bitset_words((_s)) * sizeof(long))
#if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET)
-/*
- * Dynamically allocate a bitset.
- */
#define BIT_AND(_s, d, s) __BIT_AND(_s, d, s)
#define BIT_AND2(_s, d, s1, s2) __BIT_AND2(_s, d, s1, s2)
#define BIT_ANDNOT(_s, d, s) __BIT_ANDNOT(_s, d, s)
@@ -328,8 +325,7 @@
#define BIT_FFS_AT(_s, p, start) __BIT_FFS_AT(_s, p, start)
#define BIT_FILL(_s, p) __BIT_FILL(_s, p)
#define BIT_FLS(_s, p) __BIT_FLS(_s, p)
-#define BIT_FOREACH(_s, i, p, op) __BIT_FOREACH(_s, i, p, op)
-#define BIT_FOREACH_ADVANCE(_s, i, p, op) __BIT_FOREACH_ADVANCE(_s, i, p, op)
+#define BIT_FOREACH(_s, i, p, op) __BIT_FOREACH(_s, i, p, op)
#define BIT_FOREACH_ISCLR(_s, i, p) __BIT_FOREACH_ISCLR(_s, i, p)
#define BIT_FOREACH_ISSET(_s, i, p) __BIT_FOREACH_ISSET(_s, i, p)
#define BIT_ISFULLSET(_s, p) __BIT_ISFULLSET(_s, p)
@@ -350,6 +346,9 @@
#define BIT_ZERO(_s, p) __BIT_ZERO(_s, p)
#if defined(_KERNEL)
+/*
+ * Dynamically allocate a bitset.
+ */
#define BITSET_ALLOC(_s, mt, mf) malloc(__BITSET_SIZE((_s)), mt, (mf))
#define BITSET_FREE(p, mt) free(p, mt)
#endif /* _KERNEL */