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)
Pointer to a currently installed kstat2 structure.
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.
The delete functions can be called from any context.
When the kstat2_delete() or kstat2_delete_zone() functions are called, the driver must not be holding the kstat's lock.