Debian Codegraph @

doc/doxygen-doc/man/man3/hwlocality_glibc_sched.3

raw
1 .TH "hwlocality_glibc_sched" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hwlocality_glibc_sched \- Interoperability with glibc sched affinity
6 .SH SYNOPSIS
7 .br
8 .PP
9 .SS "Functions"
10
11 .in +1c
12 .ti -1c
13 .RI "int \fBhwloc_cpuset_to_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t *schedset, size_t schedsetsize)"
14 .br
15 .ti -1c
16 .RI "int \fBhwloc_cpuset_from_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t *schedset, size_t schedsetsize)"
17 .br
18 .in -1c
19 .SH "Detailed Description"
20 .PP
21 This interface offers ways to convert between hwloc cpusets and glibc cpusets such as those manipulated by sched_getaffinity() or pthread_attr_setaffinity_np()\&.
22
23 .PP
24 \fBNote\fP
25 .RS 4
26 Topology \fRtopology\fP must match the current machine\&.
27 .RE
28 .PP
29
30 .SH "Function Documentation"
31 .PP
32 .SS "int hwloc_cpuset_from_glibc_sched_affinity (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t * schedset, size_t schedsetsize)\fR [inline]\fP"
33
34 .PP
35 Convert glibc sched affinity CPU set \fRschedset\fP into hwloc CPU set\&. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter\&.
36
37 .PP
38 \fRschedsetsize\fP should be sizeof(cpu_set_t) unless \fRschedset\fP was dynamically allocated with CPU_ALLOC
39
40 .PP
41 \fBReturns\fP
42 .RS 4
43 0 on success\&.
44
45 .PP
46 -1 with errno set to \fRENOMEM\fP if some internal reallocation failed\&.
47 .RE
48 .PP
49
50 .SS "int hwloc_cpuset_to_glibc_sched_affinity (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t * schedset, size_t schedsetsize)\fR [inline]\fP"
51
52 .PP
53 Convert hwloc CPU set \fRtoposet\fP into glibc sched affinity CPU set \fRschedset\fP\&. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter\&.
54
55 .PP
56 \fRschedsetsize\fP should be sizeof(cpu_set_t) unless \fRschedset\fP was dynamically allocated with CPU_ALLOC
57
58 .PP
59 \fBReturns\fP
60 .RS 4
61 0\&.
62 .RE
63 .PP
64
65 .SH "Author"
66 .PP
67 Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.