Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142350873
D38111.id115270.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38111.id115270.diff
View Options
diff --git a/share/man/man3/pthread_affinity_np.3 b/share/man/man3/pthread_affinity_np.3
--- a/share/man/man3/pthread_affinity_np.3
+++ b/share/man/man3/pthread_affinity_np.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 12, 2021
+.Dd January 23, 2023
.Dt PTHREAD_AFFINITY_NP 3
.Os
.Sh NAME
@@ -50,14 +50,19 @@
are composed using the
.Dv CPU_SET
macros.
-The kernel tolerates large sets as long as all CPUs specified
-in the set exist.
-Sets smaller than the kernel uses generate an error on calls to
+If the user-supplied mask is not large enough to fit all of the matching CPUs,
.Fn pthread_getaffinity_np
-even if the result set would fit within the user supplied set.
+fails with
+.Er ERANGE .
Calls to
.Fn pthread_setaffinity_np
-tolerate small sets with no restrictions.
+tolerate masks of any size with no restrictions.
+The kernel uses the meaningful part of the mask, where the upper bound is
+the maximum CPU id present in the system.
+If bits for non-existing CPUs are set, calls to
+.Fn pthread_setaffinity_np
+fails with
+.Er EINVAL .
.Pp
The supplied mask should have a size of
.Fa cpusetsize
@@ -96,6 +101,12 @@
.Fn pthread_setaffinity_np
functions may fail if:
.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa cpusetp
+argument specified when calling
+.Fn pthread_setaffinity_np
+was not a valid value.
.It Bq Er EDEADLK
The
.Fn pthread_setaffinity_np
@@ -112,7 +123,7 @@
.It Bq Er ERANGE
The
.Fa cpusetsize
-was either preposterously large or smaller than the kernel set size.
+was smaller than needed to fit all of the matching CPUs.
.It Bq Er EPERM
The calling thread did not have the credentials required to complete the
operation.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 10:16 PM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27755483
Default Alt Text
D38111.id115270.diff (1 KB)
Attached To
Mode
D38111: libthr: Fix pthread_[g|s]etaffinity_np manual.
Attached
Detach File
Event Timeline
Log In to Comment