Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v1.8

  |   Home   |   Support   |   FAQ   |  
linux.h
1 /*
2  * Copyright © 2009 CNRS
3  * Copyright © 2009-2013 Inria. All rights reserved.
4  * Copyright © 2009-2011 Université Bordeaux 1
5  * See COPYING in top-level directory.
6  */
7 
15 #ifndef HWLOC_LINUX_H
16 #define HWLOC_LINUX_H
17 
18 #include <hwloc.h>
19 #include <stdio.h>
20 
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
40 HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file(FILE *file, hwloc_cpuset_t set);
41 
47 HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
48 
54 HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
55 
59 #ifdef __cplusplus
60 } /* extern "C" */
61 #endif
62 
63 
64 #endif /* HWLOC_GLIBC_SCHED_H */
HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set)
Bind a thread tid on cpus given in cpuset set.
HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file(FILE *file, hwloc_cpuset_t set)
Convert a linux kernel cpumap file file into hwloc CPU set.
hwloc_const_bitmap_t hwloc_const_cpuset_t
A non-modifiable hwloc_cpuset_t.
Definition: hwloc.h:118
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:577
hwloc_bitmap_t hwloc_cpuset_t
A CPU set is a bitmap whose bits are set according to CPU physical OS indexes.
Definition: hwloc.h:116
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set)
Get the current binding of thread tid.