Skip to content

Commit

Permalink
API: clarify that set_pid() assumes the PID won't change until load()
Browse files Browse the repository at this point in the history
Refs #624.

Signed-off-by: Brice Goglin <[email protected]>
(cherry picked from commit e381de8)
  • Loading branch information
bgoglin committed Oct 10, 2023
1 parent ec4428c commit 141a8f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/hwloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,10 @@ HWLOC_DECLSPEC int hwloc_free(hwloc_topology_t topology, void *addr, size_t len)
* \note -1 is returned and errno is set to \c ENOSYS on platforms that do not
* support this feature.
*
* \note The PID will not actually be used until hwloc_topology_load().
* If the corresponding process exits in the meantime, hwloc will ignore the PID.
* If another process reuses the PID, the view of that process will be used.
*
* \return 0 on success, -1 on error.
*/
HWLOC_DECLSPEC int hwloc_topology_set_pid(hwloc_topology_t __hwloc_restrict topology, hwloc_pid_t pid);
Expand Down

0 comments on commit 141a8f3

Please sign in to comment.