Hardware Locality (hwloc) 1.11.9

Data Fields
hwloc_backend Struct Reference
Components and Plugins: Discovery backends

`#include <plugins.h>`

## Data Fields
unsigned long | flags
int | is_custom
int | is_thissystem
void * | private_data
void(* | disable )(struct hwloc_backend *backend)
int(* | discover )(struct hwloc_backend *backend)
int(* | get_obj_cpuset )(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset)
int(* | notify_new_object )(struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj)

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

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

Main discovery callback. returns > 0 if it modified the topology tree, -1 on error, 0 otherwise. May be NULL if type is HWLOC_DISC_COMPONENT_TYPE_MISC.

## ◆ flags

unsigned long hwloc_backend::flags

Backend flags, as an OR'ed set of hwloc_backend_flag_e.

## ◆ get_obj_cpuset

int(* hwloc_backend::get_obj_cpuset) (struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj, hwloc_bitmap_t cpuset)

Callback used by the PCI backend to retrieve the locality of a PCI object from the OS/cpu backend. May be NULL.

## ◆ is_custom

int hwloc_backend::is_custom

Backend-specific 'is_custom' property. Shortcut on !strcmp(..->component->name, "custom"). Only the custom component should touch this.

## ◆ is_thissystem

int hwloc_backend::is_thissystem

Backend-specific 'is_thissystem' property. Set to 0 or 1 if the backend should enforce the thissystem flag when it gets enabled. Set to -1 if the backend doesn't care (default).

## ◆ notify_new_object

int(* hwloc_backend::notify_new_object) (struct hwloc_backend *backend, struct hwloc_backend *caller, struct hwloc_obj *obj)

Callback called by backends to notify this backend that a new object was added. returns > 0 if it modified the topology tree, 0 otherwise. May be NULL.

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