Hardware Locality (hwloc): hwloc_backend Struct Reference

Hardware Locality (hwloc) 2.14.0rc1

Data Fields
hwloc_backend Struct Reference
Components and Plugins: Discovery components and backends

`#include <plugins.h>`

## Data Fields
unsigned | phases
unsigned long | flags
int | is_thissystem
void * | private_data
void(* | disable )(struct hwloc_backend *backend)
int(* | discover )(struct hwloc_backend *backend, struct hwloc_disc_status *status)
int(* | get_pci_busid_cpuset )(struct hwloc_backend *backend, struct hwloc_pcidev_attr_s *busid, hwloc_bitmap_t cpuset)

## Detailed Description

Discovery backend structure.

A backend is the instantiation of a discovery component. When a component gets enabled for a topology, its instantiate() callback creates a backend.

hwloc_backend_alloc() initializes all fields to default values that the component may change (except "component" and "next") before enabling the backend with hwloc_backend_enable().

Most backends assume that the topology is_thissystem flag is set because they talk to the underlying operating system. However they may still be used in topologies without the is_thissystem flag for debugging reasons. In practice, they are usually auto-disabled in such cases (excluded by xml or synthetic backends, or by environment variables when changing the Linux fsroot or the x86 cpuid path).

## Field Documentation

## ◆ disable

void(* hwloc_backend::disable) (struct hwloc_backend *backend)

Callback for freeing the private_data. May be NULL.

## ◆ discover

int(* hwloc_backend::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 existing topology, or because of an actual discovery/gathering failure. May be NULL.

## ◆ flags

unsigned long hwloc_backend::flags

Backend flags, currently always 0.

## ◆ get_pci_busid_cpuset

int(* hwloc_backend::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 hierarchy to CPU objects. May be NULL.

## ◆ is_thissystem

int hwloc_backend::is_thissystem

Backend-specific 'is_thissystem' property. Set to 0 if the backend disables the thissystem flag for this topology (e.g. loading from xml or synthetic string, or using a different fsroot on Linux, or a x86 CPUID dump). Set to -1 if the backend doesn't care (default).

## ◆ phases

unsigned hwloc_backend::phases

Discovery phases performed by this component, possibly without some of them if excluded by other components. OR'ed set of hwloc_disc_phase_t.

## ◆ private_data

void* hwloc_backend::private_data

Backend private data, or NULL if none.

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

- plugins.h