Skip to content

Commit 87c7992

Browse files
committed
hwloc/linux.h: document 0 on success and -1 on error
Refs #578 Signed-off-by: Brice Goglin <[email protected]>
1 parent 8c49593 commit 87c7992

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/hwloc/linux.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright © 2009 CNRS
3-
* Copyright © 2009-2021 Inria. All rights reserved.
3+
* Copyright © 2009-2023 Inria. All rights reserved.
44
* Copyright © 2009-2011 Université Bordeaux
55
* See COPYING in top-level directory.
66
*/
@@ -38,6 +38,8 @@ extern "C" {
3838
* The behavior is exactly the same as the Linux sched_setaffinity system call,
3939
* but uses a hwloc cpuset.
4040
*
41+
* \return 0 on success, -1 on error.
42+
*
4143
* \note This is equivalent to calling hwloc_set_proc_cpubind() with
4244
* HWLOC_CPUBIND_THREAD as flags.
4345
*/
@@ -52,6 +54,8 @@ HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t
5254
* The behavior is exactly the same as the Linux sched_getaffinity system call,
5355
* but uses a hwloc cpuset.
5456
*
57+
* \return 0 on success, -1 on error.
58+
*
5559
* \note This is equivalent to calling hwloc_get_proc_cpubind() with
5660
* ::HWLOC_CPUBIND_THREAD as flags.
5761
*/
@@ -62,6 +66,8 @@ HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t
6266
* The CPU-set \p set (previously allocated by the caller)
6367
* is filled with the PU which the thread last ran on.
6468
*
69+
* \return 0 on success, -1 on error.
70+
*
6571
* \note This is equivalent to calling hwloc_get_proc_last_cpu_location() with
6672
* ::HWLOC_CPUBIND_THREAD as flags.
6773
*/
@@ -72,6 +78,8 @@ HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topolo
7278
* Might be used when reading CPU set from sysfs attributes such as topology
7379
* and caches for processors, or local_cpus for devices.
7480
*
81+
* \return 0 on success, -1 on error.
82+
*
7583
* \note This function ignores the HWLOC_FSROOT environment variable.
7684
*/
7785
HWLOC_DECLSPEC int hwloc_linux_read_path_as_cpumask(const char *path, hwloc_bitmap_t set);

0 commit comments

Comments
 (0)