Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149211401
D51765.1789682696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D51765.1789682696.diff
View Options
diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9
--- a/share/man/man9/cpuset.9
+++ b/share/man/man9/cpuset.9
@@ -50,8 +50,10 @@
.Nm CPU_ANDNOT ,
.Nm CPU_XOR ,
.Nm CPU_CLR_ATOMIC ,
+.Nm CPU_TEST_CLR_ATOMIC ,
.Nm CPU_SET_ATOMIC ,
.Nm CPU_SET_ATOMIC_ACQ ,
+.Nm CPU_TEST_SET_ATOMIC ,
.Nm CPU_AND_ATOMIC ,
.Nm CPU_OR_ATOMIC ,
.Nm CPU_COPY_STORE_REL
@@ -93,8 +95,10 @@
.Fn CPU_XOR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2"
.\"
.Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_TEST_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.Fn CPU_SET_ATOMIC_ACQ "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_TEST_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.\"
.Fn CPU_AND_ATOMIC "cpuset_t *dst" "cpuset_t *src"
.Fn CPU_OR_ATOMIC "cpuset_t *dst" "cpuset_t *src"
@@ -143,6 +147,10 @@
.Fn CPU_CLR_ATOMIC
macro is identical, but the bit representing the CPU is cleared with atomic
machine instructions.
+The
+.Fn CPU_TEST_CLR_ATOMIC
+macro atomically clears the bit representing the CPU and returns whether it
+was set.
.Pp
The
.Fn CPU_COPY
@@ -176,6 +184,10 @@
The
.Fn CPU_SET_ATOMIC_ACQ
macro sets the bit representing the CPU with atomic acquire semantics.
+The
+.Fn CPU_TEST_SET_ATOMIC
+macro atomically sets the bit representing the CPU and returns whether it was
+set.
.Pp
The
.Fn CPU_ISSET
diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h
--- a/sys/sys/cpuset.h
+++ b/sys/sys/cpuset.h
@@ -61,8 +61,10 @@
#define CPU_ANDNOT(d, s1, s2) __BIT_ANDNOT2(CPU_SETSIZE, d, s1, s2)
#define CPU_XOR(d, s1, s2) __BIT_XOR2(CPU_SETSIZE, d, s1, s2)
#define CPU_CLR_ATOMIC(n, p) __BIT_CLR_ATOMIC(CPU_SETSIZE, n, p)
+#define CPU_TEST_CLR_ATOMIC(n, p) __BIT_TEST_CLR_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC(n, p) __BIT_SET_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC_ACQ(n, p) __BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p)
+#define CPU_TEST_SET_ATOMIC(n, p) __BIT_TEST_SET_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_AND_ATOMIC(n, p) __BIT_AND_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_OR_ATOMIC(d, s) __BIT_OR_ATOMIC(CPU_SETSIZE, d, s)
#define CPU_COPY_STORE_REL(f, t) __BIT_COPY_STORE_REL(CPU_SETSIZE, f, t)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 17, 10:04 PM (4 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29739864
Default Alt Text
D51765.1789682696.diff (2 KB)
Attached To
Mode
D51765: sys: Add CPU_TEST_{SET,CLR}_ATOMIC
Attached
Detach File
Event Timeline
Log In to Comment