Skip to content

Commit a610f7d

Browse files
committed
API: reorder membind support bits
We're breaking the ABI in 3.0 so let's reorder these bits in a more logical manner. Signed-off-by: Brice Goglin <[email protected]>
1 parent bcfd5ba commit a610f7d

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

hwloc/topology-xml.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,16 +1081,16 @@ hwloc__xml_import_support(hwloc_topology_t topology,
10811081
else DO(membind,get_proc_membind);
10821082
else DO(membind,set_thisthread_membind);
10831083
else DO(membind,get_thisthread_membind);
1084+
else DO(membind,alloc_membind);
10841085
else DO(membind,set_area_membind);
10851086
else DO(membind,get_area_membind);
1086-
else DO(membind,alloc_membind);
1087+
else DO(membind,get_area_memlocation);
10871088
else DO(membind,firsttouch_membind);
10881089
else DO(membind,bind_membind);
10891090
else DO(membind,interleave_membind);
10901091
else DO(membind,weighted_interleave_membind);
10911092
else DO(membind,nexttouch_membind);
10921093
else DO(membind,migrate_membind);
1093-
else DO(membind,get_area_memlocation);
10941094

10951095
else if (!strcmp("custom.exported_support", name))
10961096
/* support was exported in a custom/fake field, mark it as imported here */
@@ -2510,16 +2510,16 @@ hwloc__xml_v2export_support(hwloc__xml_export_state_t parentstate, hwloc_topolog
25102510
DO(membind,get_proc_membind);
25112511
DO(membind,set_thisthread_membind);
25122512
DO(membind,get_thisthread_membind);
2513+
DO(membind,alloc_membind);
25132514
DO(membind,set_area_membind);
25142515
DO(membind,get_area_membind);
2515-
DO(membind,alloc_membind);
2516+
DO(membind,get_area_memlocation);
25162517
DO(membind,firsttouch_membind);
25172518
DO(membind,bind_membind);
25182519
DO(membind,interleave_membind);
25192520
DO(membind,weighted_interleave_membind);
25202521
DO(membind,nexttouch_membind);
25212522
DO(membind,migrate_membind);
2522-
DO(membind,get_area_memlocation);
25232523

25242524
/* misc.imported_support would be meaningless in the remote importer,
25252525
* but the importer needs to know whether we exported support or not

include/hwloc.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,26 +2508,28 @@ struct hwloc_topology_membind_support {
25082508
unsigned char set_thisthread_membind;
25092509
/** Getting the binding of the current thread only is supported. */
25102510
unsigned char get_thisthread_membind;
2511+
2512+
/** Allocating a bound memory area is supported. */
2513+
unsigned char alloc_membind;
25112514
/** Binding a given memory area is supported. */
25122515
unsigned char set_area_membind;
25132516
/** Getting the binding of a given memory area is supported. */
25142517
unsigned char get_area_membind;
2515-
/** Allocating a bound memory area is supported. */
2516-
unsigned char alloc_membind;
2518+
/** Getting the last NUMA nodes where a memory area was allocated is supported */
2519+
unsigned char get_area_memlocation;
2520+
25172521
/** First-touch policy is supported. */
25182522
unsigned char firsttouch_membind;
25192523
/** Bind policy is supported. */
25202524
unsigned char bind_membind;
25212525
/** Interleave policy is supported. */
25222526
unsigned char interleave_membind;
2527+
/** Weighted interleave policy is supported. */
2528+
unsigned char weighted_interleave_membind;
25232529
/** Next-touch migration policy is supported. */
25242530
unsigned char nexttouch_membind;
25252531
/** Migration flags is supported. */
25262532
unsigned char migrate_membind;
2527-
/** Getting the last NUMA nodes where a memory area was allocated is supported */
2528-
unsigned char get_area_memlocation;
2529-
/** Weighted interleave policy is supported. */
2530-
unsigned char weighted_interleave_membind;
25312533
};
25322534

25332535
/** \brief Flags describing miscellaneous features.

utils/hwloc/hwloc-info.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,16 +748,16 @@ hwloc_info_show_support(hwloc_topology_t topology)
748748
DO(membind, get_proc_membind);
749749
DO(membind, set_thisthread_membind);
750750
DO(membind, get_thisthread_membind);
751+
DO(membind, alloc_membind);
751752
DO(membind, set_area_membind);
752753
DO(membind, get_area_membind);
753-
DO(membind, alloc_membind);
754+
DO(membind, get_area_memlocation);
754755
DO(membind, firsttouch_membind);
755756
DO(membind, bind_membind);
756757
DO(membind, interleave_membind);
757758
DO(membind, weighted_interleave_membind);
758759
DO(membind, nexttouch_membind);
759760
DO(membind, migrate_membind);
760-
DO(membind, get_area_memlocation);
761761

762762
DO(misc, imported_support);
763763
#undef DO

0 commit comments

Comments
 (0)