Hardware Locality (hwloc): hwloc_component Struct Reference

Hardware Locality (hwloc) 2.14.0rc1

Data Fields
hwloc_component Struct Reference
Components and Plugins: Generic components

`#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

## ◆ abi

unsigned hwloc_component::abi

Component ABI version, set to HWLOC_COMPONENT_ABI.

## ◆ data

void* hwloc_component::data

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

## ◆ finalize

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.

## ◆ flags

unsigned long hwloc_component::flags

Component flags, unused for now.

## ◆ init

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.

## ◆ type

hwloc_component_type_t hwloc_component::type

Component type.

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

- plugins.h