]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
hwloc.h: Fix proc_cpubind() proc_last_cpu_location() documentation when using Linux TID
authorBrice Goglin <Brice.Goglin@inria.fr>
Wed, 18 Dec 2013 19:03:57 +0000 (20:03 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Wed, 18 Dec 2013 19:03:57 +0000 (20:03 +0100)
and document that hwloc_linux_*_tid_cpubind() are equivalent.

include/hwloc.h
include/hwloc/linux.h

index 85b74f159ac0225d2dff1f8bf471702adbb1376a..83bdbe4e98c8e19646c4ace031114fe6a1706f51 100644 (file)
@@ -1368,7 +1368,11 @@ HWLOC_DECLSPEC int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t s
  * \note \p hwloc_pid_t is \p pid_t on Unix platforms,
  * and \p HANDLE on native Windows platforms.
  *
- * \note HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note As a special case on Linux, if a tid (thread ID) is supplied
+ * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * the binding is applied to that specific thread.
+ *
+ * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
  */
 HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags);
 
@@ -1377,11 +1381,11 @@ HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t
  * \note \p hwloc_pid_t is \p pid_t on Unix platforms,
  * and \p HANDLE on native Windows platforms.
  *
- * \note HWLOC_CPUBIND_THREAD can not be used in \p flags.
- *
  * \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID), the binding for that specific thread
- * is returned.
+ * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * the binding for that specific thread is returned.
+ *
+ * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
  */
 HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
 
@@ -1434,7 +1438,9 @@ HWLOC_DECLSPEC int hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_
  *
  * \note As a special case on Linux, if a tid (thread ID) is supplied
  * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
- * the binding for that specific thread is returned.
+ * the last CPU location of that specific thread is returned.
+ *
+ * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
  */
 HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
 
index a10527825d7ae3bd33a77d6c06bc8dcd37be748b..1df904651b698dc26ac551dffd882c0197139574 100644 (file)
@@ -43,6 +43,9 @@ HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file(FILE *file, hwloc_cpuset_t set)
  *
  * The behavior is exactly the same as the Linux sched_setaffinity system call,
  * but uses a hwloc cpuset.
+ *
+ * \note This is equivalent to calling hwloc_set_proc_cpubind() with
+ * HWLOC_CPUBIND_THREAD as flags.
  */
 HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
 
@@ -50,6 +53,9 @@ HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t
  *
  * The behavior is exactly the same as the Linux sched_getaffinity system call,
  * but uses a hwloc cpuset.
+ *
+ * \note This is equivalent to calling hwloc_get_proc_cpubind() with
+ * HWLOC_CPUBIND_THREAD as flags.
  */
 HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);