]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libutil/cpuset.3
sqlite3: Vendor import of sqlite3 3.43.1
[FreeBSD/FreeBSD.git] / lib / libutil / cpuset.3
1 .\" Copyright (c) 2017 Baptiste Daroussin <bapt@FreeBSD.org>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .Dd October 31, 2017
26 .Dt CPUSET 3
27 .Os
28 .Sh NAME
29 .Nm cpuset_parselist
30 .Nd utility functions for
31 .Xr cpuset 2
32 handling
33 .Sh LIBRARY
34 .Lb libutil
35 .Sh SYNOPSIS
36 .In sys/cpuset.h
37 .In libutil.h
38 .Ft int
39 .Fn cpuset_parselist "const char *cpu-list" "cpuset_t *mask"
40 .Sh DESCRIPTION
41 The
42 .Fn cpuset_parselist
43 function parses a
44 .Va cpu-list
45 filling the
46 .Va mask .
47 .Pp
48 The
49 .Va cpu-list
50 may include numbers separated by '-' for ranges and commas separating individual
51 numbers.
52 A special list of
53 .Dq all
54 may be specified in which case the list includes all CPUs from the root set.
55 .Sh RETURN VALUES
56 Return values can be the following
57 .Bl -tag -width Er
58 .It Dv CPUSET_PARSE_OK
59 The parsing was successful
60 .It Dv CPUSET_PARSE_ERROR
61 The
62 .Va cpu-list
63 format is invalid
64 .It Dv CPUSET_PARSE_GETAFFINITY
65 The
66 .Xr cpuset_getaffinity 2
67 call has failed
68 .It Dv CPUSET_PARSE_INVALID_CPU
69 The number of supported CPUs has been exceeded.
70 The maximum number being
71 .Va CPU_SETSIZE .
72 .El
73 .Sh SEE ALSO
74 .Xr cpuset 1 ,
75 .Xr cpuset 2 ,
76 .Xr cpuset 9
77 .Sh AUTHORS
78 .An Jeffrey Roberson Aq Mt jeff@FreeBSD.org