kstat2_delete, kstat2_delete_zone - remove a kstat from the system
#include <sys/types.h> #include <sys/kstat2.h> void kstat2_delete(kstat2_t *ksp); void kstat2_delete_zone(kid_t ks_kid, zoneid_t ks_zoneid);
Solaris DDI specific (Solaris DDI)
kstat2_delete() function
Pointer to a currently installed kstat2 structure.
kstat2_delete_zone() function
ID of the kstat which is to be removed.
ID of the zone in which this kstat is visible.
kstat2_delete() function removes ksp from the kstat chain and frees all associated system resources.
kstat2_delete_zone() function checks to see if a kstat with the given kstat ID is visible in the zone with ID ks_zoneid and then, removes the kstat from the kstat chain and frees all associated system resources.
In both cases, if the kstat is found and has the KSTAT2_FLAG_PERSISTENT flag set, the kstat is made dormant rather than being removed from the system.
None
The delete functions can be called from any context.
kstat2_create(9F), kstat2_install(9F), kstat2(9S)
When the kstat2_delete() or kstat2_delete_zone() functions are called, the driver must not be holding the kstat's lock.