Hardware Locality (hwloc) 2.14.0

plugins.h
1/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright © 2013-2024 Inria. All rights reserved.
4 * Copyright © 2016 Cisco Systems, Inc. All rights reserved.
5 * Copyright © 2025 Siemens Corporation and/or its affiliates. All rights reserved.
6 * See COPYING in top-level directory.
7 */
8
9#ifndef HWLOC_PLUGINS_H
10#define HWLOC_PLUGINS_H
11
15
16 struct hwloc_backend;
17
18#include "hwloc.h"
19
20#ifdef HWLOC_INSIDE_PLUGIN
21/* needed for hwloc_plugin_check_namespace() */
22#ifdef HWLOC_HAVE_LTDL
23#include <ltdl.h>
24#elif !defined(HWLOC_WIN_SYS)
25#include <dlfcn.h>
26#endif
27#endif
28
29
30
37
43 struct hwloc_disc_component {
47 const char *name;
48
52 unsigned phases;
53
62 unsigned excluded_phases;
63
67 struct hwloc_backend * (*instantiate)(struct hwloc_topology *topology, struct hwloc_disc_component *component, unsigned excluded_phases, const void *data1, const void *data2, const void *data3);
68
81 unsigned priority;
82
86 unsigned enabled_by_default;
87
92 struct hwloc_disc_component * next;
93};
94
96 typedef enum hwloc_disc_phase_e {
101 HWLOC_DISC_PHASE_GLOBAL = (1U<<0),
102
105 HWLOC_DISC_PHASE_CPU = (1U<<1),
106
109 HWLOC_DISC_PHASE_MEMORY = (1U<<2),
110
113 HWLOC_DISC_PHASE_PCI = (1U<<3),
114
117 HWLOC_DISC_PHASE_IO = (1U<<4),
118
121 HWLOC_DISC_PHASE_MISC = (1U<<5),
122
125 HWLOC_DISC_PHASE_ANNOTATE = (1U<<6),
126
132 HWLOC_DISC_PHASE_TWEAK = (1U<<7)
133} hwloc_disc_phase_t;
134
136 enum hwloc_disc_status_flag_e {
138 HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES = (1UL<<1)
139};
140
146 struct hwloc_disc_status {
150 hwloc_disc_phase_t phase;
151
155 unsigned excluded_phases;
156
158 unsigned long flags;
159};
160
179 struct hwloc_backend {
181 struct hwloc_disc_component * component;
183 struct hwloc_topology * topology;
185 int envvar_forced;
187 struct hwloc_backend * next;
188
192 unsigned phases;
193
195 unsigned long flags;
196
203 int is_thissystem;
204
206 void * private_data;
210 void (*disable)(struct hwloc_backend *backend);
211
217 int (*discover)(struct hwloc_backend *backend, struct hwloc_disc_status *status);
218
223 int (*get_pci_busid_cpuset)(struct hwloc_backend *backend, struct hwloc_pcidev_attr_s *busid, hwloc_bitmap_t cpuset);
224};
225
229HWLOC_DECLSPEC struct hwloc_backend * hwloc_backend_alloc(struct hwloc_topology *topology, struct hwloc_disc_component *component);
230
232HWLOC_DECLSPEC int hwloc_backend_enable(struct hwloc_backend *backend);
233
235
236
237
238
245
247 typedef enum hwloc_component_type_e {
249 HWLOC_COMPONENT_TYPE_DISC,
250
252 HWLOC_COMPONENT_TYPE_XML
253} hwloc_component_type_t;
254
260 struct hwloc_component {
262 unsigned abi;
263
281 int (*init)(unsigned long flags);
282
294 void (*finalize)(unsigned long flags);
295
297 hwloc_component_type_t type;
298
300 unsigned long flags;
301
303 void * data;
304};
305
327 static __hwloc_inline int
328 hwloc_plugin_check_namespace(const char *pluginname __hwloc_attribute_unused, const char *symbol __hwloc_attribute_unused)
329{
330#ifdef HWLOC_INSIDE_PLUGIN
331 void *sym;
332#ifdef HWLOC_HAVE_LTDL
333 lt_dlhandle handle = lt_dlopen(NULL);
334#elif defined(HWLOC_WIN_SYS)
335 HMODULE handle = GetModuleHandleA(NULL);
336#else
337 void *handle = dlopen(NULL, RTLD_NOW|RTLD_LOCAL);
338#endif
339 if (!handle)
340 /* cannot check, assume things will work */
341 return 0;
342#ifdef HWLOC_HAVE_LTDL
343 sym = lt_dlsym(handle, symbol);
344 lt_dlclose(handle);
345#elif defined(HWLOC_WIN_SYS)
346 sym = GetModuleHandleA("hwloc.dll");
347 FreeLibrary(handle);
348#else
349 sym = dlsym(handle, symbol);
350 dlclose(handle);
351#endif
352 if (!sym) {
353 static int verboseenv_checked = 0;
354 static int verboseenv_value = 0;
355 if (!verboseenv_checked) {
356 const char *verboseenv = getenv("HWLOC_PLUGINS_VERBOSE");
357 verboseenv_value = verboseenv ? atoi(verboseenv) : 0;
358 verboseenv_checked = 1;
359 }
360 if (verboseenv_value)
361 fprintf(stderr, "Plugin `%s' disabling itself because it cannot find the `%s' core symbol.\n",
362 pluginname, symbol);
363 return -1;
364 }
365#endif /* HWLOC_INSIDE_PLUGIN */
366 return 0;
367}
368
370
371
372
373
380
398HWLOC_DECLSPEC int hwloc_hide_errors(void);
399
400#define HWLOC_SHOW_CRITICAL_ERRORS() (hwloc_hide_errors() < 2)
401#define HWLOC_SHOW_ALL_ERRORS() (hwloc_hide_errors() == 0)
402
431HWLOC_DECLSPEC hwloc_obj_t
432 hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t root,
433 hwloc_obj_t obj, const char *reason);
434
451HWLOC_DECLSPEC void hwloc_insert_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj);
452
457HWLOC_DECLSPEC hwloc_obj_t hwloc_alloc_setup_object(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned os_index);
458
467HWLOC_DECLSPEC int hwloc_obj_add_children_sets(hwloc_obj_t obj);
468
476HWLOC_DECLSPEC int hwloc_topology_reconnect(hwloc_topology_t topology, unsigned long flags __hwloc_attribute_unused);
477
479
480
481
482
489
494 static __hwloc_inline int
495 hwloc_filter_check_pcidev_subtype_important(unsigned classid)
496{
497 unsigned baseclass = classid >> 8;
498 return (baseclass == 0x03 /* PCI_BASE_CLASS_DISPLAY */
499 || baseclass == 0x02 /* PCI_BASE_CLASS_NETWORK */
500 || baseclass == 0x01 /* PCI_BASE_CLASS_STORAGE */
501 || baseclass == 0x00 /* Unclassified, for Atos/Bull BXI */
502 || baseclass == 0x0b /* PCI_BASE_CLASS_PROCESSOR */
503 || classid == 0x0c04 /* PCI_CLASS_SERIAL_FIBER */
504 || classid == 0x0c06 /* PCI_CLASS_SERIAL_INFINIBAND */
505 || classid == 0x0502 /* PCI_CLASS_MEMORY_CXL */
506 || baseclass == 0x06 /* PCI_BASE_CLASS_BRIDGE with non-PCI downstream. the core will drop the useless ones later */
507 || baseclass == 0x12 /* Processing Accelerators */);
508}
509
514 static __hwloc_inline int
515 hwloc_filter_check_osdev_subtype_important(hwloc_obj_osdev_type_t subtype)
516{
517 return (subtype != HWLOC_OBJ_OSDEV_DMA);
518}
519
526 static __hwloc_inline int
527 hwloc_filter_check_keep_object_type(hwloc_topology_t topology, hwloc_obj_type_t type)
528{
529 enum hwloc_type_filter_e filter = HWLOC_TYPE_FILTER_KEEP_NONE;
530 hwloc_topology_get_type_filter(topology, type, &filter);
531 assert(filter != HWLOC_TYPE_FILTER_KEEP_IMPORTANT); /* IMPORTANT only used for I/O */
532 return filter == HWLOC_TYPE_FILTER_KEEP_NONE ? 0 : 1;
533}
534
539 static __hwloc_inline int
540 hwloc_filter_check_keep_object(hwloc_topology_t topology, hwloc_obj_t obj)
541{
542 hwloc_obj_type_t type = obj->type;
543 enum hwloc_type_filter_e filter = HWLOC_TYPE_FILTER_KEEP_NONE;
544 hwloc_topology_get_type_filter(topology, type, &filter);
545 if (filter == HWLOC_TYPE_FILTER_KEEP_NONE)
546 return 0;
547 if (filter == HWLOC_TYPE_FILTER_KEEP_IMPORTANT) {
548 if (type == HWLOC_OBJ_PCI_DEVICE)
549 return hwloc_filter_check_pcidev_subtype_important(obj->attr->pcidev.class_id);
550 if (type == HWLOC_OBJ_OS_DEVICE)
551 return hwloc_filter_check_osdev_subtype_important(obj->attr->osdev.type);
552 }
553 return 1;
554}
555
557
558
559
560
567
572HWLOC_DECLSPEC unsigned hwloc_pcidisc_find_cap(const unsigned char *config, unsigned cap);
573
579HWLOC_DECLSPEC int hwloc_pcidisc_find_linkspeed(const unsigned char *config, unsigned offset, float *linkspeed);
580
585HWLOC_DECLSPEC hwloc_obj_type_t hwloc_pcidisc_check_bridge_type(unsigned device_class, const unsigned char *config);
586
593HWLOC_DECLSPEC int hwloc_pcidisc_find_bridge_buses(unsigned domain, unsigned bus, unsigned dev, unsigned func,
594 unsigned *secondary_busp, unsigned *subordinate_busp,
595 const unsigned char *config);
596
601HWLOC_DECLSPEC void hwloc_pcidisc_tree_insert_by_busid(struct hwloc_obj **treep, struct hwloc_obj *obj);
602
608HWLOC_DECLSPEC int hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *tree);
609
611
612
613
614
621
633HWLOC_DECLSPEC struct hwloc_obj * hwloc_pci_find_parent_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
634
641HWLOC_DECLSPEC struct hwloc_obj * hwloc_pci_find_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func);
642
643
645
646
647
648
655
657 typedef void * hwloc_backend_distances_add_handle_t;
658
665HWLOC_DECLSPEC hwloc_backend_distances_add_handle_t
666 hwloc_backend_distances_add_create(hwloc_topology_t topology,
667 const char *name, unsigned long kind,
668 unsigned long flags);
669
681HWLOC_DECLSPEC int
682 hwloc_backend_distances_add_values(hwloc_topology_t topology,
683 hwloc_backend_distances_add_handle_t handle,
684 unsigned nbobjs, hwloc_obj_t *objs,
685 hwloc_uint64_t *values,
686 unsigned long flags);
687
694HWLOC_DECLSPEC int
695 hwloc_backend_distances_add_commit(hwloc_topology_t topology,
696 hwloc_backend_distances_add_handle_t handle,
697 unsigned long flags);
698
700
701
702
703
704#endif /* HWLOC_PLUGINS_H */
hwloc_obj_osdev_type_t
enum hwloc_obj_osdev_type_e hwloc_obj_osdev_type_t
Type of a OS device.
hwloc_obj_type_t
hwloc_obj_type_t
Type of topology object.
Definition hwloc.h:202
HWLOC_OBJ_OSDEV_DMA
@ HWLOC_OBJ_OSDEV_DMA
Operating system dma engine device. For instance the "dma0chan0" DMA channel on Linux.
Definition hwloc.h:389
HWLOC_OBJ_OS_DEVICE
@ HWLOC_OBJ_OS_DEVICE
Operating system device (filtered out by default).
Definition hwloc.h:310
HWLOC_OBJ_PCI_DEVICE
@ HWLOC_OBJ_PCI_DEVICE
PCI device (filtered out by default).
Definition hwloc.h:300
hwloc_obj_t
struct hwloc_obj * hwloc_obj_t
Convenience typedef; a pointer to a struct hwloc_obj.
Definition hwloc.h:637
hwloc_topology_t
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition hwloc.h:748
hwloc_topology_get_type_filter
int hwloc_topology_get_type_filter(hwloc_topology_t topology, hwloc_obj_type_t type, enum hwloc_type_filter_e *filter)
Get the current filtering for the given object type.
hwloc_type_filter_e
hwloc_type_filter_e
Type filtering flags.
Definition hwloc.h:2445
HWLOC_TYPE_FILTER_KEEP_NONE
@ HWLOC_TYPE_FILTER_KEEP_NONE
Ignore all objects of this type.
Definition hwloc.h:2459
HWLOC_TYPE_FILTER_KEEP_IMPORTANT
@ HWLOC_TYPE_FILTER_KEEP_IMPORTANT
Only keep likely-important objects of the given type.
Definition hwloc.h:2490
hwloc_bitmap_t
struct hwloc_bitmap_s * hwloc_bitmap_t
Set of bits represented as an opaque pointer to an internal bitmap.
Definition bitmap.h:70
hwloc_backend_enable
int hwloc_backend_enable(struct hwloc_backend *backend)
Enable a previously allocated and setup backend.
hwloc_disc_phase_t
enum hwloc_disc_phase_e hwloc_disc_phase_t
Discovery phase.
hwloc_backend_alloc
struct hwloc_backend * hwloc_backend_alloc(struct hwloc_topology *topology, struct hwloc_disc_component *component)
Allocate a backend structure, set good default values, initialize backend->component and topology,...
hwloc_disc_phase_e
hwloc_disc_phase_e
Discovery phase.
Definition plugins.h:96
hwloc_disc_status_flag_e
hwloc_disc_status_flag_e
Discovery status flags.
Definition plugins.h:136
HWLOC_DISC_PHASE_CPU
@ HWLOC_DISC_PHASE_CPU
CPU discovery.
Definition plugins.h:105
HWLOC_DISC_PHASE_PCI
@ HWLOC_DISC_PHASE_PCI
Attach PCI devices and bridges to existing CPU objects.
Definition plugins.h:113
HWLOC_DISC_PHASE_ANNOTATE
@ HWLOC_DISC_PHASE_ANNOTATE
Annotating existing objects, adding distances, etc.
Definition plugins.h:125
HWLOC_DISC_PHASE_MISC
@ HWLOC_DISC_PHASE_MISC
Misc objects that gets added below anything else.
Definition plugins.h:121
HWLOC_DISC_PHASE_IO
@ HWLOC_DISC_PHASE_IO
I/O discovery that requires PCI devices (OS devices such as OpenCL, CUDA, etc.).
Definition plugins.h:117
HWLOC_DISC_PHASE_GLOBAL
@ HWLOC_DISC_PHASE_GLOBAL
xml or synthetic, platform-specific components such as bgq. Discovers everything including CPU,...
Definition plugins.h:101
HWLOC_DISC_PHASE_MEMORY
@ HWLOC_DISC_PHASE_MEMORY
Attach memory to existing CPU objects.
Definition plugins.h:109
HWLOC_DISC_PHASE_TWEAK
@ HWLOC_DISC_PHASE_TWEAK
Final tweaks to a ready-to-use topology. This phase runs once the topology is loaded,...
Definition plugins.h:132
HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES
@ HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES
The sets of allowed resources were already retrieved.
Definition plugins.h:138
hwloc_component_type_t
enum hwloc_component_type_e hwloc_component_type_t
Generic component type.
hwloc_component_type_e
hwloc_component_type_e
Generic component type.
Definition plugins.h:247
hwloc_plugin_check_namespace
int hwloc_plugin_check_namespace(const char *pluginname, const char *symbol)
Make sure that plugins can lookup core symbols.
Definition plugins.h:328
HWLOC_COMPONENT_TYPE_DISC
@ HWLOC_COMPONENT_TYPE_DISC
The data field must point to a struct hwloc_disc_component.
Definition plugins.h:249
HWLOC_COMPONENT_TYPE_XML
@ HWLOC_COMPONENT_TYPE_XML
The data field must point to a struct hwloc_xml_component.
Definition plugins.h:252
hwloc_alloc_setup_object
hwloc_obj_t hwloc_alloc_setup_object(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned os_index)
Allocate and initialize an object of the given type and physical index.
hwloc_insert_object_by_parent
void hwloc_insert_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj)
Insert an object somewhere in the topology.
hwloc_topology_reconnect
int hwloc_topology_reconnect(hwloc_topology_t topology, unsigned long flags)
Request a reconnection of children and levels in the topology.
hwloc__insert_object_by_cpuset
hwloc_obj_t hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t root, hwloc_obj_t obj, const char *reason)
Add an object to the topology.
hwloc_obj_add_children_sets
int hwloc_obj_add_children_sets(hwloc_obj_t obj)
Setup object cpusets/nodesets by OR'ing its children.
hwloc_hide_errors
int hwloc_hide_errors(void)
Check whether error messages are hidden.
hwloc_filter_check_keep_object
int hwloc_filter_check_keep_object(hwloc_topology_t topology, hwloc_obj_t obj)
Check whether the given object should be filtered-out.
Definition plugins.h:540
hwloc_filter_check_pcidev_subtype_important
int hwloc_filter_check_pcidev_subtype_important(unsigned classid)
Check whether the given PCI device classid is important.
Definition plugins.h:495
hwloc_filter_check_osdev_subtype_important
int hwloc_filter_check_osdev_subtype_important(hwloc_obj_osdev_type_t subtype)
Check whether the given OS device subtype is important.
Definition plugins.h:515
hwloc_filter_check_keep_object_type
int hwloc_filter_check_keep_object_type(hwloc_topology_t topology, hwloc_obj_type_t type)
Check whether a non-I/O object type should be filtered-out.
Definition plugins.h:527
hwloc_pcidisc_find_linkspeed
int hwloc_pcidisc_find_linkspeed(const unsigned char *config, unsigned offset, float *linkspeed)
Fill linkspeed by reading the PCI config space where PCI_CAP_ID_EXP is at position offset.
hwloc_pcidisc_check_bridge_type
hwloc_obj_type_t hwloc_pcidisc_check_bridge_type(unsigned device_class, const unsigned char *config)
Return the hwloc object type (PCI device or Bridge) for the given class and configuration space.
hwloc_pcidisc_find_cap
unsigned hwloc_pcidisc_find_cap(const unsigned char *config, unsigned cap)
Return the offset of the given capability in the PCI config space buffer.
hwloc_pcidisc_find_bridge_buses
int hwloc_pcidisc_find_bridge_buses(unsigned domain, unsigned bus, unsigned dev, unsigned func, unsigned *secondary_busp, unsigned *subordinate_busp, const unsigned char *config)
Fills the attributes of the given PCI bridge using the given PCI config space.
hwloc_pcidisc_tree_insert_by_busid
void hwloc_pcidisc_tree_insert_by_busid(struct hwloc_obj **treep, struct hwloc_obj *obj)
Insert a PCI object in the given PCI tree by looking at PCI bus IDs.
hwloc_pcidisc_tree_attach
int hwloc_pcidisc_tree_attach(struct hwloc_topology *topology, struct hwloc_obj *tree)
Add some hostbridges on top of the given tree of PCI objects and attach them to the topology.
hwloc_pci_find_by_busid
struct hwloc_obj * hwloc_pci_find_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)
Find the PCI device or bridge matching a PCI bus ID exactly.
hwloc_pci_find_parent_by_busid
struct hwloc_obj * hwloc_pci_find_parent_by_busid(struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)
Find the object or a parent of a PCI bus ID.
hwloc_backend_distances_add_commit
int hwloc_backend_distances_add_commit(hwloc_topology_t topology, hwloc_backend_distances_add_handle_t handle, unsigned long flags)
Commit a new distances structure.
hwloc_backend_distances_add_values
int hwloc_backend_distances_add_values(hwloc_topology_t topology, hwloc_backend_distances_add_handle_t handle, unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values, unsigned long flags)
Specify the objects and values in a new empty distances structure.
hwloc_backend_distances_add_create
hwloc_backend_distances_add_handle_t hwloc_backend_distances_add_create(hwloc_topology_t topology, const char *name, unsigned long kind, unsigned long flags)
Create a new empty distances structure.
hwloc_backend_distances_add_handle_t
void * hwloc_backend_distances_add_handle_t
Handle to a new distances structure during its addition to the topology.
Definition plugins.h:657
hwloc_obj
Structure of a topology object.
Definition hwloc.h:437
hwloc_obj::name
char * name
Object-specific name if any. Mostly used for identifying OS devices and Misc objects where a name str...
Definition hwloc.h:449
hwloc_obj::type
hwloc_obj_type_t type
Type of object.
Definition hwloc.h:439
hwloc_obj::attr
union hwloc_obj_attr_u * attr
Object type-specific Attributes, may be NULL if no attribute value was found.
Definition hwloc.h:456
hwloc_obj_attr_u::pcidev
struct hwloc_obj_attr_u::hwloc_pcidev_attr_s pcidev
hwloc_obj_attr_u::osdev
struct hwloc_obj_attr_u::hwloc_osdev_attr_s osdev
hwloc_obj_attr_u::hwloc_pcidev_attr_s::class_id
unsigned short class_id
The class number (first two bytes, without the prog_if).
Definition hwloc.h:685
hwloc_obj_attr_u::hwloc_osdev_attr_s::type
hwloc_obj_osdev_type_t type
Definition hwloc.h:722
hwloc_disc_component
Discovery component structure.
Definition plugins.h:43
hwloc_disc_component::name
const char * name
Name. If this component is built as a plugin, this name does not have to match the plugin filename.
Definition plugins.h:47
hwloc_disc_component::phases
unsigned phases
Discovery phases performed by this component. OR'ed set of hwloc_disc_phase_t.
Definition plugins.h:52
hwloc_disc_component::excluded_phases
unsigned excluded_phases
Component phases to exclude, as an OR'ed set of hwloc_disc_phase_t.
Definition plugins.h:62
hwloc_disc_component::enabled_by_default
unsigned enabled_by_default
Enabled by default. If unset, if will be disabled unless explicitly requested.
Definition plugins.h:86
hwloc_disc_component::priority
unsigned priority
Component priority. Used to sort topology->components, higher priority first. Also used to decide bet...
Definition plugins.h:81
hwloc_disc_status
Discovery status structure.
Definition plugins.h:146
hwloc_disc_status::excluded_phases
unsigned excluded_phases
Dynamically excluded phases. If a component decides during discovery that some phases are no longer n...
Definition plugins.h:155
hwloc_disc_status::phase
hwloc_disc_phase_t phase
The current discovery phase that is performed. Must match one of the phases in the component phases f...
Definition plugins.h:150
hwloc_disc_status::flags
unsigned long flags
OR'ed set of hwloc_disc_status_flag_e.
Definition plugins.h:158
hwloc_backend
Discovery backend structure.
Definition plugins.h:179
hwloc_backend::private_data
void * private_data
Backend private data, or NULL if none.
Definition plugins.h:206
hwloc_backend::disable
void(* disable)(struct hwloc_backend *backend)
Callback for freeing the private_data. May be NULL.
Definition plugins.h:210
hwloc_backend::flags
unsigned long flags
Backend flags, currently always 0.
Definition plugins.h:195
hwloc_backend::get_pci_busid_cpuset
int(* get_pci_busid_cpuset)(struct hwloc_backend *backend, struct hwloc_pcidev_attr_s *busid, hwloc_bitmap_t cpuset)
Callback to retrieve the locality of a PCI object. Called by the PCI core when attaching PCI hierarch...
Definition plugins.h:223
hwloc_backend::is_thissystem
int is_thissystem
Backend-specific 'is_thissystem' property. Set to 0 if the backend disables the thissystem flag for t...
Definition plugins.h:203
hwloc_backend::discover
int(* discover)(struct hwloc_backend *backend, struct hwloc_disc_status *status)
Main discovery callback. returns -1 on error, either because it couldn't add its objects ot the exist...
Definition plugins.h:217
hwloc_backend::phases
unsigned phases
Discovery phases performed by this component, possibly without some of them if excluded by other comp...
Definition plugins.h:192
hwloc_component
Generic component structure.
Definition plugins.h:260
hwloc_component::abi
unsigned abi
Component ABI version, set to HWLOC_COMPONENT_ABI.
Definition plugins.h:262
hwloc_component::finalize
void(* finalize)(unsigned long flags)
Process-wide component termination callback.
Definition plugins.h:294
hwloc_component::data
void * data
Component data, pointing to a struct hwloc_disc_component or struct hwloc_xml_component.
Definition plugins.h:303
hwloc_component::type
hwloc_component_type_t type
Component type.
Definition plugins.h:297
hwloc_component::flags
unsigned long flags
Component flags, unused for now.
Definition plugins.h:300
hwloc_component::init
int(* init)(unsigned long flags)
Process-wide component initialization callback.
Definition plugins.h:281