kstat2_install - add a fully initialized kstat to the system
#include <sys/types.h> #include <sys/kstat2.h> void kstat2_install(kstat2_t *ksp);
Solaris DDI specific (Solaris DDI)
Pointer to a fully initialized kstat2(9S) structure.
kstat2_install() function is used in conjunction with kstat2_create() function to allocate and initialize a kstat2 structure.
After a successful call to kstat2_create() function, the driver must perform any necessary initialization of the data section. The provider might also set the ks2_update, ks2_private, and ks2_lock fields if necessary. These fields should be set before kstat2_install() function is called.
Once the kstat is completely initialized, kstat2_install marks it as valid and you may start to access its data.
None
The kstat2_install() function can be called from user or kernel context.
The method for allocating and initializing a kstat structure is generally as follows:
kstat2_t *ksp; ksp = kstat2_create(pseg, npseg, zoneid, &data, ndata, flags, md); if (ksp != NULL) { /* ... provider initialization, if necessary */ kstat2_install(ksp); }
kstat2_create(9F), kstat2_create_histogram(9F), kstat2_create_with_template(9F), kstat2_delete(9F), kstat2_lookup_template(9F), kstat2_nv_init(9F), kstat2(9S), kstat2_named(9S)