Hardware Locality (hwloc): linux.h Source File

Hardware Locality (hwloc) 2.14.0rc1

linux.h
1/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright © 2009 CNRS
4 * Copyright © 2009-2023 Inria. All rights reserved.
5 * Copyright © 2009-2011 Université Bordeaux
6 * See COPYING in top-level directory.
7 */
8
15
16#ifndef HWLOC_LINUX_H
17#define HWLOC_LINUX_H
18
19#include "hwloc.h"
20
21#include <stdio.h>
22
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28
36
47HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
48
63HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
64
75HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topology, pid_t tid, hwloc_bitmap_t set);
76
86HWLOC_DECLSPEC int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set);
87
89
90
91#ifdef __cplusplus
92} /* extern "C" */
93#endif
94
95
96#endif /* HWLOC_LINUX_H */
hwloc_const_cpuset_t
hwloc_const_bitmap_t hwloc_const_cpuset_t
A non-modifiable hwloc_cpuset_t.
Definition hwloc.h:167
hwloc_cpuset_t
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:165
hwloc_topology_t
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition hwloc.h:748
hwloc_bitmap_t
struct hwloc_bitmap_s * hwloc_bitmap_t
Set of bits represented as an opaque pointer to an internal bitmap.
Definition bitmap.h:70
hwloc_linux_set_tid_cpubind
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_linux_get_tid_last_cpu_location
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.
hwloc_linux_get_tid_cpubind
int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set)
Get the current binding of thread tid.
hwloc_linux_read_path_as_cpumask
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.