From 9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:06 +0200 Subject: Adding upstream version 6.7. Signed-off-by: Daniel Baumann --- man3/CPU_SET.3 | 60 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'man3/CPU_SET.3') diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3 index aa5d71d..6c13a62 100644 --- a/man3/CPU_SET.3 +++ b/man3/CPU_SET.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH CPU_SET 3 2023-05-03 "Linux man-pages 6.05.01" +.TH CPU_SET 3 2023-10-31 "Linux man-pages 6.7" .SH NAME CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT, CPU_AND, CPU_OR, CPU_XOR, CPU_EQUAL, @@ -19,43 +19,43 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include -.PP +.P .BI "void CPU_ZERO(cpu_set_t *" set ); -.PP +.P .BI "void CPU_SET(int " cpu ", cpu_set_t *" set ); .BI "void CPU_CLR(int " cpu ", cpu_set_t *" set ); .BI "int CPU_ISSET(int " cpu ", cpu_set_t *" set ); -.PP +.P .BI "int CPU_COUNT(cpu_set_t *" set ); -.PP +.P .BI "void CPU_AND(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_OR(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_XOR(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); -.PP +.P .BI "int CPU_EQUAL(cpu_set_t *" set1 ", cpu_set_t *" set2 ); -.PP +.P .BI "cpu_set_t *CPU_ALLOC(int " num_cpus ); .BI "void CPU_FREE(cpu_set_t *" set ); .BI "size_t CPU_ALLOC_SIZE(int " num_cpus ); -.PP +.P .BI "void CPU_ZERO_S(size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "void CPU_SET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); .BI "void CPU_CLR_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); .BI "int CPU_ISSET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "int CPU_COUNT_S(size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "void CPU_AND_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_OR_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_XOR_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); -.PP +.P .BI "int CPU_EQUAL_S(size_t " setsize ", cpu_set_t *" set1 \ ", cpu_set_t *" set2 ); .fi @@ -66,14 +66,14 @@ data structure represents a set of CPUs. CPU sets are used by .BR sched_setaffinity (2) and similar interfaces. -.PP +.P The .I cpu_set_t data type is implemented as a bit mask. However, the data structure should be treated as opaque: all manipulation of CPU sets should be done via the macros described in this page. -.PP +.P The following macros are provided to operate on the CPU set .IR set : .TP @@ -103,12 +103,12 @@ is a member of .BR CPU_COUNT () Return the number of CPUs in .IR set . -.PP +.P Where a .I cpu argument is specified, it should not produce side effects, since the above macros may evaluate the argument more than once. -.PP +.P The first CPU on the system corresponds to a .I cpu value of 0, the next CPU corresponds to a @@ -122,7 +122,7 @@ The constant (currently 1024) specifies a value one greater than the maximum CPU number that can be stored in .IR cpu_set_t . -.PP +.P The following macros perform logical operations on CPU sets: .TP .BR CPU_AND () @@ -165,7 +165,7 @@ size CPU sets (e.g., to allocate sets larger than that defined by the standard .I cpu_set_t data type), glibc nowadays provides a set of macros to support this. -.PP +.P The following macros are used to allocate and deallocate CPU sets: .TP .BR CPU_ALLOC () @@ -186,7 +186,7 @@ macros described below. .BR CPU_FREE () Free a CPU set previously allocated by .BR CPU_ALLOC (). -.PP +.P The macros whose names end with "_S" are the analogs of the similarly named macros without the suffix. These macros perform the same tasks as their analogs, @@ -202,27 +202,27 @@ return nonzero if is in .IR set ; otherwise, it returns 0. -.PP +.P .BR CPU_COUNT () and .BR CPU_COUNT_S () return the number of CPUs in .IR set . -.PP +.P .BR CPU_EQUAL () and .BR CPU_EQUAL_S () return nonzero if the two CPU sets are equal; otherwise they return 0. -.PP +.P .BR CPU_ALLOC () returns a pointer on success, or NULL on failure. (Errors are as for .BR malloc (3).) -.PP +.P .BR CPU_ALLOC_SIZE () returns the number of bytes required to store a CPU set of the specified cardinality. -.PP +.P The other functions do not return a value. .SH STANDARDS Linux. @@ -234,10 +234,10 @@ The and .BR CPU_ISSET () macros were added in glibc 2.3.3. -.PP +.P .BR CPU_COUNT () first appeared in glibc 2.6. -.PP +.P .BR CPU_AND (), .BR CPU_OR (), .BR CPU_XOR (), @@ -258,14 +258,14 @@ first appeared in glibc 2.7. .SH NOTES To duplicate a CPU set, use .BR memcpy (3). -.PP +.P Since CPU sets are bit masks allocated in units of long words, the actual number of CPUs in a dynamically allocated CPU set will be rounded up to the next multiple of .IR "sizeof(unsigned long)" . An application should consider the contents of these extra bits to be undefined. -.PP +.P Notwithstanding the similarity in the names, note that the constant .B CPU_SETSIZE @@ -277,7 +277,7 @@ while the argument of the .BR CPU_*_S () macros is a size in bytes. -.PP +.P The data types for arguments and return values shown in the SYNOPSIS are hints what about is expected in each case. However, since these interfaces are implemented as macros, @@ -298,7 +298,7 @@ These bugs are fixed in glibc 2.9. .SH EXAMPLES The following program demonstrates the use of some of the macros used for dynamically allocated CPU sets. -.PP +.P .\" SRC BEGIN (CPU_SET.c) .EX #define _GNU_SOURCE -- cgit v1.2.3