Skip to content

Commit ea7f6ba

Browse files
committed
API: more links between hwloc_topology_alloc/insert/free_group_object()
Signed-off-by: Brice Goglin <[email protected]>
1 parent ce4652d commit ea7f6ba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

include/hwloc.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2789,13 +2789,15 @@ HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object(hwloc_topology_t to
27892789
* This function returns a new Group object.
27902790
*
27912791
* The caller should (at least) initialize its sets before inserting
2792-
* the object in the topology. See hwloc_topology_insert_group_object().
2792+
* the object in the topology, see hwloc_topology_insert_group_object().
2793+
* Or it may decide not to insert and just free the group object
2794+
* by calling hwloc_topology_free_group_object().
27932795
*
27942796
* \return The allocated object on success.
27952797
* \return \c NULL on error.
27962798
*
2797-
* \note The only way to free this object is to pass it to hwloc_topology_insert_group_object().
2798-
* If properly inserted, it will be freed when the entire topology is freed.
2799+
* \note If successfully inserted by hwloc_topology_insert_group_object(),
2800+
* the object will be freed when the entire topology is freed.
27992801
* If insertion failed (e.g. \c NULL or empty CPU and node-sets),
28002802
* it is freed before returning the error.
28012803
*/
@@ -2853,6 +2855,9 @@ HWLOC_DECLSPEC int hwloc_topology_free_group_object(hwloc_topology_t topology, h
28532855
*
28542856
* \note If the insertion fails, the input group object is freed.
28552857
*
2858+
* \note If the group object should be discarded instead of inserted,
2859+
* it may be passed to hwloc_topology_free_group_object() instead.
2860+
*
28562861
* \note \p topology must be the same as the one previously passed
28572862
* to hwloc_topology_alloc_group_object().
28582863
*

0 commit comments

Comments
 (0)