2 .\" Copyright (c) 2002, Sun Microsystems, Inc., All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH KSTAT_INTR 9S "Apr 4, 1994"
8 kstat_intr \- structure for interrupt kstats
12 #include <sys/types.h>
13 #include <sys/kstat.h>
15 #include <sys/sunddi.h>
21 Solaris DDI specific (Solaris DDI)
25 Interrupt statistics are kept in the \fBkstat_intr\fR structure. When
26 \fBkstat_create\fR(9F) creates an interrupt \fBkstat\fR, the \fBks_data\fR
27 field is a pointer to one of these structures. The macro \fBKSTAT_INTR_PTR()\fR
28 is provided to retrieve this field. It looks like this:
32 #define KSTAT_INTR_PTR(kptr) ((kstat_intr_t *)(kptr)->ks_data)
38 An interrupt is a hard interrupt (sourced from the hardware device itself), a
39 soft interrupt (induced by the system through the use of some system interrupt
40 source), a watchdog interrupt (induced by a periodic timer call), spurious (an
41 interrupt entry point was entered but there was no interrupt to service), or
42 multiple service (an interrupt was detected and serviced just prior to
43 returning from any of the other types).
46 Drivers generally report only claimed hard interrupts and soft interrupts from
47 their handlers, but measurement of the spurious class of interrupts is useful
48 for auto-vectored devices in order to pinpoint any interrupt latency problems
49 in a particular system configuration.
52 Devices that have more than one interrupt of the same type should use multiple
58 ulong_t intrs[KSTAT_NUM_INTRS]; /* interrupt counters */
64 The only member exposed to drivers is the \fBintrs\fR member. This field is an
65 array of counters. The driver must use the appropriate counter in the array
66 based on the type of interrupt condition.
69 The following indexes are supported:
73 \fB\fBKSTAT_INTR_HARD\fR \fR
82 \fB\fBKSTAT_INTR_SOFT\fR \fR
91 \fB\fBKSTAT_INTR_WATCHDOG\fR \fR
100 \fB\fBKSTAT_INTR_SPURIOUS\fR \fR
109 \fB\fBKSTAT_INTR_MULTSVC\fR \fR
112 Multiple service interrupt
121 \fIWriting Device Drivers\fR