Hardware Locality (hwloc) 2.14.0

Data Structures | Typedefs | Enumerations | Functions
Components and Plugins: Generic components

## Data Structures
struct | hwloc_component

## Typedefs
typedef enum hwloc_component_type_e | hwloc_component_type_t

## Enumerations
enum | hwloc_component_type_e { HWLOC_COMPONENT_TYPE_DISC , HWLOC_COMPONENT_TYPE_XML }

## Functions
int | hwloc_plugin_check_namespace (const char *pluginname, const char *symbol)

## Detailed Description

Note
  These structures and functions may change when HWLOC_COMPONENT_ABI is modified.

## Typedef Documentation

## ◆ hwloc_component_type_t

typedef enum hwloc_component_type_e hwloc_component_type_t

Generic component type.

## Enumeration Type Documentation

## ◆ hwloc_component_type_e

enum hwloc_component_type_e

Generic component type.

Enumerator
HWLOC_COMPONENT_TYPE_DISC | The data field must point to a struct hwloc_disc_component.
HWLOC_COMPONENT_TYPE_XML | The data field must point to a struct hwloc_xml_component.

## Function Documentation

## ◆ hwloc_plugin_check_namespace()

int hwloc_plugin_check_namespace | ( | const char * | pluginname,
|  | const char * | symbol )
| inline

Make sure that plugins can lookup core symbols.

This is a sanity check to avoid lazy-lookup failures when libhwloc is loaded within a plugin, and later tries to load its own plugins. This may fail (and abort the program) if libhwloc symbols are in a private namespace.

Returns
  0 on success.
  -1 if the plugin cannot be successfully loaded. The caller plugin init() callback should return a negative error code as well.

Plugins should call this function in their init() callback to avoid later crashes if lazy symbol resolution is used by the upper layer that loaded hwloc (e.g. OpenCL implementations using dlopen with RTLD_LAZY).

Note
  The build system must define HWLOC_INSIDE_PLUGIN if and only if building the caller as a plugin.
  This function should remain inline so plugins can call it even when they cannot find libhwloc symbols.