1 .\" $NetBSD: cpuset.3,v 1.3 2008/09/12 13:39:04 rmind Exp $
3 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Mindaugas Rasiukevicius <rmind at NetBSD org>.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
30 .Dd September 12, 2008
45 .Fn cpuset_create "void"
47 .Fn cpuset_destroy "cpuset_t *set"
49 .Fn cpuset_zero "cpuset_t *set"
51 .Fn cpuset_set "cpuid_t cpu" "cpuset_t *set"
53 .Fn cpuset_clr "cpuid_t cpu" "cpuset_t *set"
55 .Fn cpuset_isset "cpuid_t cpu" "const cpuset_t *set"
57 .Fn cpuset_size "const cpuset_t *set"
59 This section describes the functions used to create, set, use and destroy
62 This API can be used with the POSIX threads, see
67 The ID of the primary CPU in the system is 0.
69 .Bl -tag -width compact
71 Allocates and initializes a clean CPU-set.
72 Returns the pointer to the CPU-set, or
75 .It Fn cpuset_destroy set
76 Destroy the CPU-set specified by
78 .It Fn cpuset_zero set
79 Makes the CPU-set specified by
81 clean, that is, memory is initialized to zero bytes, and none of
83 .It Fn cpuset_set cpu set
84 Sets the CPU specified by
88 Returns zero on success, and \-1 if
91 .It Fn cpuset_clr cpu set
92 Clears the CPU specified by
96 Returns zero on success, and \-1 if
99 .It Fn cpuset_isset cpu set
100 Checks if CPU specified by
102 is set in the CPU-set
104 Returns the positive number if set, zero if not set, and \-1 if
107 .It Fn cpuset_size set
108 Returns the size in bytes of CPU-set specified by
117 The dynamic CPU sets appeared in