Print this page
mandoc -Tlint fixes
Describe KSTAT_DATA_TIME.
@@ -1,96 +1,81 @@
KSTAT_NAMED_INIT(9F) Kernel Functions for Drivers KSTAT_NAMED_INIT(9F)
-
-
NAME
- kstat_named_init, kstat_named_setstr - initialize a named kstat
+ kstat_named_init kstat_named_setstr - initialize a named kstat
SYNOPSIS
- #include <sys/types.h>
- #include <sys/kstat.h>
+ <sys/types.h>
+ <sys/kstat.h>
-
-
- void kstat_named_init(kstat_named_t *knp, const char *name,
+ 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);
- void kstat_named_setstr(kstat_named_t *knp, const char *str);
-
-
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
- knp
- Pointer to a kstat_named(9S) structure.
+ knp Pointer to a kstat_named(9S) structure.
+ name The name of the statistic.
- name
- The name of the statistic.
-
-
data_type
The type of value. This indicates which field of the
- kstat_named(9S) structure should be used. Valid values
- are:
+ kstat_named(9S) structure should be used. Valid values are:
KSTAT_DATA_CHAR
The "char" field.
-
KSTAT_DATA_LONG
The "long" field.
-
KSTAT_DATA_ULONG
The "unsigned long" field.
-
KSTAT_DATA_LONGLONG
Obsolete. Use KSTAT_DATA_INT64.
-
KSTAT_DATA_ULONGLONG
Obsolete. Use KSTAT_DATA_UINT64.
-
KSTAT_DATA_STRING
- Arbitrary length "long string"
- field.
+ Arbitrary length "long string" field.
+ KSTAT_DATA_TIME
+ The high resolution time stamp field. Note that this
+ should only be used for absolute time stamps, such as
+ returned by gethrtime(9F), and not for relative
+ durations. For relative durations, KSTAT_DATA_UINT64 is
+ preferred.
+ str Pointer to a NULL-terminated string.
- str
- Pointer to a NULL-terminated string.
-
-
DESCRIPTION
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. If KSTAT_DATA_STRING is used in a
persistent kstat the string argument must remain valid even after the
module that created the kstat is unloaded. This is the only supported
method of changing the value of long strings.
-RETURN VALUES
- None.
-
CONTEXT
kstat_named_init() and kstat_named_setstr() can be called from user or
kernel context.
+RETURN VALUES
+ None.
+
SEE ALSO
- kstat_create(9F), kstat_install(9F), kstat(9S), kstat_named(9S)
+ gethrtime(9F), kstat_create(9F), kstat_install(9F), kstat(9S),
+ kstat_named(9S)
+ Writing Device Drivers.
- Writing Device Drivers
-
-
-
- February 29, 2008 KSTAT_NAMED_INIT(9F)
+illumos January 27, 2016 illumos