Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

kstat2_delete_zone (9F)

Name

kstat2_delete, kstat2_delete_zone - remove a kstat from the system

Synopsis

#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);

Interface Level

Solaris DDI specific (Solaris DDI)

Parameters

kstat2_delete() function

ksp

Pointer to a currently installed kstat2 structure.

kstat2_delete_zone() function

ks_kid

ID of the kstat which is to be removed.

ks_zoneid

ID of the zone in which this kstat is visible.

Description

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.

Return Values

None

Context

The delete functions can be called from any context.

See Also

kstat2_create(9F), kstat2_install(9F), kstat2(9S)

Notes

When the kstat2_delete() or kstat2_delete_zone() functions are called, the driver must not be holding the kstat's lock.