Functions | |
static __inline__ topo_obj_t | topo_get_system_obj (topo_topology_t topology) |
Returns the top-object of the topology-tree. Its type is TOPO_OBJ_SYSTEM. | |
static __inline__ topo_obj_t | topo_get_obj (topo_topology_t topology, topo_obj_type_t type, unsigned index) |
Returns the topology object at index index with type type . | |
static __inline__ topo_obj_t | topo_get_next_obj_by_depth (topo_topology_t topology, unsigned depth, topo_obj_t prev) |
Returns the next object at depth depth . | |
static __inline__ topo_obj_t | topo_get_next_obj (topo_topology_t topology, topo_obj_type_t type, topo_obj_t prev) |
Returns the next object of type type . | |
static __inline__ topo_obj_t | topo_get_next_child (topo_topology_t topology, topo_obj_t father, topo_obj_t prev) |
Return the next child. | |
static __inline__ topo_obj_t | topo_get_common_ancestor_obj (topo_obj_t obj1, topo_obj_t obj2) |
Returns the common father object to objects lvl1 and lvl2. | |
static __inline__ int | topo_obj_is_in_subtree (topo_obj_t obj, topo_obj_t subtree_root) |
Returns true if _obj_ is inside the subtree beginning with subtree_root . |
static __inline__ topo_obj_t topo_get_common_ancestor_obj | ( | topo_obj_t | obj1, | |
topo_obj_t | obj2 | |||
) | [static] |
Returns the common father object to objects lvl1 and lvl2.
static __inline__ topo_obj_t topo_get_next_child | ( | topo_topology_t | topology, | |
topo_obj_t | father, | |||
topo_obj_t | prev | |||
) | [static] |
Return the next child.
If prev
is NULL
, return the first child.
static __inline__ topo_obj_t topo_get_next_obj | ( | topo_topology_t | topology, | |
topo_obj_type_t | type, | |||
topo_obj_t | prev | |||
) | [static] |
Returns the next object of type type
.
If prev
is NULL
, return the first object at type type
. If there are multiple or no depth for given type, return NULL
and let the caller fallback to topo_get_next_obj_by_depth().
static __inline__ topo_obj_t topo_get_next_obj_by_depth | ( | topo_topology_t | topology, | |
unsigned | depth, | |||
topo_obj_t | prev | |||
) | [static] |
Returns the next object at depth depth
.
If prev
is NULL
, return the first object at depth depth
.
static __inline__ topo_obj_t topo_get_obj | ( | topo_topology_t | topology, | |
topo_obj_type_t | type, | |||
unsigned | index | |||
) | [static] |
Returns the topology object at index index
with type type
.
If no object for that type exists, NULL
is returned. If there are several levels with objects of that type, NULL
is returned and ther caller may fallback to topo_get_obj_by_depth().
static __inline__ topo_obj_t topo_get_system_obj | ( | topo_topology_t | topology | ) | [static] |
Returns the top-object of the topology-tree. Its type is TOPO_OBJ_SYSTEM.
static __inline__ int topo_obj_is_in_subtree | ( | topo_obj_t | obj, | |
topo_obj_t | subtree_root | |||
) | [static] |
Returns true if _obj_ is inside the subtree beginning with subtree_root
.