Print this page
mandoc -Tlint fixes
Describe KSTAT_DATA_TIME.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man9f/kstat_named_init.9f.man.txt
+++ new/usr/src/man/man9f/kstat_named_init.9f.man.txt
1 1 KSTAT_NAMED_INIT(9F) Kernel Functions for Drivers KSTAT_NAMED_INIT(9F)
2 2
3 -
4 -
5 3 NAME
6 - kstat_named_init, kstat_named_setstr - initialize a named kstat
4 + kstat_named_init kstat_named_setstr - initialize a named kstat
7 5
8 6 SYNOPSIS
9 - #include <sys/types.h>
10 - #include <sys/kstat.h>
7 + <sys/types.h>
8 + <sys/kstat.h>
11 9
10 + void
11 + kstat_named_init(kstat_named_t *knp, const char *name,
12 + uchar_t data_type);
12 13
14 + void
15 + kstat_named_setstr(kstat_named_t *knp, const char *str);
13 16
14 - void kstat_named_init(kstat_named_t *knp, const char *name,
15 - uchar_t data_type);
16 -
17 -
18 - void kstat_named_setstr(kstat_named_t *knp, const char *str);
19 -
20 -
21 17 INTERFACE LEVEL
22 - Solaris DDI specific (Solaris DDI)
18 + Solaris DDI specific (Solaris DDI)
23 19
24 20 PARAMETERS
25 - knp
26 - Pointer to a kstat_named(9S) structure.
21 + knp Pointer to a kstat_named(9S) structure.
27 22
23 + name The name of the statistic.
28 24
29 - name
30 - The name of the statistic.
25 + data_type
26 + The type of value. This indicates which field of the
27 + kstat_named(9S) structure should be used. Valid values are:
31 28
29 + KSTAT_DATA_CHAR
30 + The "char" field.
32 31
33 - data_type
34 - The type of value. This indicates which field of the
35 - kstat_named(9S) structure should be used. Valid values
36 - are:
32 + KSTAT_DATA_LONG
33 + The "long" field.
37 34
38 - KSTAT_DATA_CHAR
39 - The "char" field.
35 + KSTAT_DATA_ULONG
36 + The "unsigned long" field.
40 37
38 + KSTAT_DATA_LONGLONG
39 + Obsolete. Use KSTAT_DATA_INT64.
41 40
42 - KSTAT_DATA_LONG
43 - The "long" field.
41 + KSTAT_DATA_ULONGLONG
42 + Obsolete. Use KSTAT_DATA_UINT64.
44 43
44 + KSTAT_DATA_STRING
45 + Arbitrary length "long string" field.
45 46
46 - KSTAT_DATA_ULONG
47 - The "unsigned long" field.
47 + KSTAT_DATA_TIME
48 + The high resolution time stamp field. Note that this
49 + should only be used for absolute time stamps, such as
50 + returned by gethrtime(9F), and not for relative
51 + durations. For relative durations, KSTAT_DATA_UINT64 is
52 + preferred.
48 53
54 + str Pointer to a NULL-terminated string.
49 55
50 - KSTAT_DATA_LONGLONG
51 - Obsolete. Use KSTAT_DATA_INT64.
52 -
53 -
54 - KSTAT_DATA_ULONGLONG
55 - Obsolete. Use KSTAT_DATA_UINT64.
56 -
57 -
58 - KSTAT_DATA_STRING
59 - Arbitrary length "long string"
60 - field.
61 -
62 -
63 -
64 - str
65 - Pointer to a NULL-terminated string.
66 -
67 -
68 56 DESCRIPTION
69 - kstat_named_init() associates a name and a type with a kstat_named(9S)
70 - structure.
57 + kstat_named_init() associates a name and a type with a kstat_named(9S)
58 + structure.
71 59
60 + kstat_named_setstr() associates str with the named kstat knp. It is an
61 + error for knp to be of type other than KSTAT_DATA_STRING. The string
62 + argument must remain valid even after the function that is calling
63 + kstat_named_setstr() is returned. If KSTAT_DATA_STRING is used in a
64 + persistent kstat the string argument must remain valid even after the
65 + module that created the kstat is unloaded. This is the only supported
66 + method of changing the value of long strings.
72 67
73 - kstat_named_setstr() associates str with the named kstat knp. It is an
74 - error for knp to be of type other than KSTAT_DATA_STRING. The string
75 - argument must remain valid even after the function that is calling
76 - kstat_named_setstr() is returned. If KSTAT_DATA_STRING is used in a
77 - persistent kstat the string argument must remain valid even after the
78 - module that created the kstat is unloaded. This is the only supported
79 - method of changing the value of long strings.
68 +CONTEXT
69 + kstat_named_init() and kstat_named_setstr() can be called from user or
70 + kernel context.
80 71
81 72 RETURN VALUES
82 - None.
73 + None.
83 74
84 -CONTEXT
85 - kstat_named_init() and kstat_named_setstr() can be called from user or
86 - kernel context.
87 -
88 75 SEE ALSO
89 - kstat_create(9F), kstat_install(9F), kstat(9S), kstat_named(9S)
76 + gethrtime(9F), kstat_create(9F), kstat_install(9F), kstat(9S),
77 + kstat_named(9S)
90 78
79 + Writing Device Drivers.
91 80
92 - Writing Device Drivers
93 -
94 -
95 -
96 - February 29, 2008 KSTAT_NAMED_INIT(9F)
81 +illumos January 27, 2016 illumos
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX