Hardware Locality (hwloc)  v2.2-20200401.0300.gitd2f52ab
Data Fields
hwloc_component Struct Reference

#include <plugins.h>

Data Fields

unsigned abi
int(* init )(unsigned long flags)
void(* finalize )(unsigned long flags)
hwloc_component_type_t type
unsigned long flags
void * data

Detailed Description

Generic component structure.

Generic components structure, either statically listed by configure in static-components.h or dynamically loaded as a plugin.


Field Documentation

Component ABI version, set to HWLOC_COMPONENT_ABI.

Component data, pointing to a struct hwloc_disc_component or struct hwloc_xml_component.

void(* hwloc_component::finalize)(unsigned long flags)

Process-wide component termination callback.

This optional callback is called after unregistering the component from the hwloc core (before unloading the plugin).

flags is always 0 for now.

Note:
If the component uses ltdl for loading its own plugins, it should load/unload them only in init() and finalize(), to avoid race conditions with hwloc's use of ltdl.
unsigned long hwloc_component::flags

Component flags, unused for now.

int(* hwloc_component::init)(unsigned long flags)

Process-wide component initialization callback.

This optional callback is called when the component is registered to the hwloc core (after loading the plugin).

When the component is built as a plugin, this callback should call hwloc_check_plugin_namespace() and return an negative error code on error.

flags is always 0 for now.

Returns:
0 on success, or a negative code on error.
Note:
If the component uses ltdl for loading its own plugins, it should load/unload them only in init() and finalize(), to avoid race conditions with hwloc's use of ltdl.

Component type.


The documentation for this struct was generated from the following file: