hwgraph.vertex(D3X)hwgraph.vertex(D3X)NAME
hwgraph.vertex: hwgraph_vertex_create, hwgraph_vertex_destroy,
hwgraph_vertex_clone, hwgraph_vertex_ref, hwgraph_vertex_unref - manage
vertexes of hardware graph
SYNOPSIS
#include <sys/types.h>
#include <sys/hwgraph.h>
#include <sys/ddi.h>
graph_error_t
hwgraph_vertex_create(vertex_hdl_t *vhdlp);
graph_error_t
hwgraph_vertex_destroy(vertex_hdl_t vhdl);
graph_error_t
hwgraph_vertex_clone(vertex_hdl_t vhdl, vertex_hdl_t *vhdlp);
graph_error_t
hwgraph_vertex_ref(vertex_hdl_t vhdl);
graph_error_t
hwgraph_vertex_unref(vertex_hdl_t vhdl);
Arguments
vhdl Handle of existing vertex, input to the operation.
vhdlp Address of a field to receive the handle of a new vertex
created in the operation.
DESCRIPTION
These functions are used by the kernel to implement higher-level hwgraph
operations such as hwgraph_char_device_add() (see hwgraph.dev(D3X)).
These functions are almost never needed by a device driver. One reason
is that the higher-level functions properly manage the vertex reference
count, an issue with many complexities.
o hwgraph_vertex_create() creates a new vertex with a reference count
of 1.
o hwgraph_vertex_destroy() marks the vertex to be recycled when its
reference count falls to 0.
o hwgraph_vertex_clone() makes a copy of a vertex.
o hwgraph_vertex_ref() explicitly increments the reference count of a
vertex.
o hwgraph_vertex_unref() explicitly decrements the reference count of a
vertex.
Page 1
hwgraph.vertex(D3X)hwgraph.vertex(D3X)DIAGNOSTICS
Functions return GRAPH_SUCCESS when the operation completes successfully,
or a failure code as defined in hwgraph.intro(D3X) when the operation
does not complete successfully.
SEE ALSOhwgraph.dev(D3X), hwgraph.intro(D4X).
Page 2