kstat_named_init, kstat_named_setstr - initialize a named kstat
#include <sys/types.h> #include <sys/kstat.h> void kstat_named_init(kstat_named_t *knp, const char *name, uchar_t data_type);
void kstat_named_setstr(kstat_named_t *knp, const char *str);
Solaris DDI specific (Solaris DDI)
knp
name
data_type
KSTAT_DATA_CHAR
KSTAT_DATA_LONG
KSTAT_DATA_ULONG
KSTAT_DATA_LONGLONG
KSTAT_DATA_ULONGLONG
KSTAT_DATA_STRING
str
kstat_named_init() associates a name and a type with a kstat_named(9S) structure.
kstat_named_setstr() associates str with the named kstat knp. It is an error for knp to be of type other than KSTAT_DATA_STRING. The string argument must remain valid even after the function that is calling kstat_named_setstr() is returned. This is the only supported method of changing the value of long strings.
kstat_named_init() and kstat_named_setstr() can be called from user or kernel context.
kstat_create(9F), kstat_install(9F), kstat(9S), kstat_named(9S)
Writing Device Drivers
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |