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

#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

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

Callback for freeing the private_data. May be NULL.

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.

unsigned long hwloc_backend::flags

Backend flags, currently always 0.

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.

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).

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

Backend private data, or NULL if none.


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