Go to main content

man pages section 9: DDI and DKI Properties and Data Structures

Exit Print View

Updated: Thursday, June 13, 2019
 
 

kstat_intr(9S)

Name

kstat_intr - obsolete structure for interrupt kstats

Synopsis

#include <sys/types.h>
#include <sys/kstat.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>

Interface Level

Solaris DDI specific (Solaris DDI)

Description

Interrupt statistics are kept in the kstat_intr structure. When kstat_create(9F) creates an interrupt kstat, the ks_data field is a pointer to one of these structures. The macro KSTAT_INTR_PTR() is provided to retrieve this field. It looks like this:

#define KSTAT_INTR_PTR(kptr)	((kstat_intr_t *)(kptr)->ks_data)

An interrupt can be of several types. A hard interrupt (sourced from the hardware device itself), a soft interrupt (induced by the system through the use of some system interrupt source), a watchdog interrupt (induced by a periodic timer call), spurious (an interrupt entry point was entered but there was no interrupt to service), or multiple service (an interrupt was detected and serviced just prior to returning from any of the other types).

Drivers generally report only claimed hard interrupts and soft interrupts from their handlers, but measurement of the spurious class of interrupts is useful for auto-vectored devices in order to pinpoint any interrupt latency problems in a particular system configuration.

Devices that have more than one interrupt of the same type should use multiple structures.

Structure Members

ulong_t    intrs[KSTAT_NUM_INTRS];    /* interrupt counters */

The only member exposed to drivers is the intrs member. This field is an array of counters. The driver must use the appropriate counter in the array based on the type of interrupt condition.

The following indexes are supported:

KSTAT_INTR_HARD

Hard interrupt

KSTAT_INTR_SOFT

Soft interrupt

KSTAT_INTR_WATCHDOG

Watchdog interrupt

KSTAT_INTR_SPURIOUS

Spurious interrupt

KSTAT_INTR_MULTSVC

Multiple service interrupt

See Also

kstat(9S), kstat2_lookup_template(9F), kstat2_create_with_template(9F), kstat2_intr(9S)

Writing Device Drivers in Oracle Solaris 11.4

Notes

The use of the kstat_intr structure is deprecated. The data-structure may be removed in a future release of Oracle Solaris. Creating an interrupt kstat is now achieved using the kstat2_lookup_template() function and passing the result to the kstat2_create_with_template() function. For more information, see the kstat2_lookup_template(9F) and kstat2_create_with_template(9F) man pages. The interrupt data is described in the kstat2_intr(9S) man page.