Module Name:    src
Committed By:   wiz
Date:           Fri Feb 21 15:25:38 UTC 2025

Modified Files:
        src/lib/libpthread: affinity.3

Log Message:
slightly expand example


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libpthread/affinity.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/affinity.3
diff -u src/lib/libpthread/affinity.3:1.8 src/lib/libpthread/affinity.3:1.9
--- src/lib/libpthread/affinity.3:1.8	Mon Dec  5 10:27:40 2011
+++ src/lib/libpthread/affinity.3	Fri Feb 21 15:25:37 2025
@@ -1,4 +1,4 @@
-.\"	$NetBSD: affinity.3,v 1.8 2011/12/05 10:27:40 wiz Exp $
+.\"	$NetBSD: affinity.3,v 1.9 2025/02/21 15:25:37 wiz Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 4, 2011
+.Dd February 21, 2025
 .Dt AFFINITY 3
 .Os
 .Sh NAME
@@ -95,6 +95,7 @@ thread to the CPU whose ID is 0:
 	cpuset_t *cset;
 	pthread_t pth;
 	cpuid_t ci;
+	int error;
 
 	cset = cpuset_create();
 	if (cset == NULL) {
@@ -106,7 +107,7 @@ thread to the CPU whose ID is 0:
 	pth = pthread_self();
 	error = pthread_setaffinity_np(pth, cpuset_size(cset), cset);
 	if (error) {
-		...
+		err(EXIT_FAILURE, "pthread_setaffinity_np failed");
 	}
 	cpuset_destroy(cset);
 .Ed

Reply via email to