Generic component structure.
Generic components structure, either statically listed by configure in static-components.h or dynamically loaded as a plugin.
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.
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.