Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v2.2.0

  |   Home   |   Support   |   FAQ   |  
linux.h
1 /*
2  * Copyright © 2009 CNRS
3  * Copyright © 2009-2016 Inria. All rights reserved.
4  * Copyright © 2009-2011 Université Bordeaux
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 
20 #include <stdio.h>
21 
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 
44 HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
45 
54 HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
55 
61 HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topology, pid_t tid, hwloc_bitmap_t set);
62 
70 HWLOC_DECLSPEC int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set);
71 
75 #ifdef __cplusplus
76 } /* extern "C" */
77 #endif
78 
79 
80 #endif /* HWLOC_LINUX_H */
hwloc_const_bitmap_t hwloc_const_cpuset_t
A non-modifiable hwloc_cpuset_t.
Definition: hwloc.h:142
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:678
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:140
int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set)
Convert a linux kernel cpumask file path into a hwloc bitmap set.
struct hwloc_bitmap_s * hwloc_bitmap_t
Set of bits represented as an opaque pointer to an internal bitmap.
Definition: bitmap.h:68
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.
int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set)
Get the current binding of thread tid.
int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topology, pid_t tid, hwloc_bitmap_t set)
Get the last physical CPU where thread tid ran.