1ddi_intr_get_hilevel_pri(9KFe)rnel Functions for Drivedrdsi_intr_get_hilevel_pri(9F)
2
3
4

NAME

6       ddi_intr_get_hilevel_pri  - get minimum priority level for a high-level
7       interrupt
8

SYNOPSIS

10       #include <sys/types.h>
11       #include <sys/conf.h>
12       #include <sys/ddi.h>
13       #include <sys/sunddi.h>
14
15       int ddi_intr_get_hilevel_pri(void);
16
17

INTERFACE LEVEL

19       Solaris DDI specific (Solaris DDI).
20

DESCRIPTION

22       Upon  a  successful  return,  the  ddi_intr_get_hilevel_pri()  function
23       returns  the  minimum  priority  level  for a high-level interrupt. The
24       return priority value can be used to compare to other priority  values,
25       such  as  those  returned  from ddi_intr_get_pri(9F), to determine if a
26       given interrupt priority is a high-level interrupt.
27
28
29       High-level interrupts must be handled  without  using  system  services
30       that  manipulate  thread or process states, because such interrupts are
31       not blocked by the scheduler.
32
33
34       In addition, high-level interrupt handlers must take care to do a mini‐
35       mum of work because they cannot be preempted.
36
37
38       A typical high-level interrupt handler puts data into a circular buffer
39       and schedule a soft interrupt  by  calling  ddi_intr_trigger_softint().
40       The  circular buffer can be protected by using a mutex that is properly
41       initialized for the interrupt handler.
42
43
44       The ddi_intr_get_hilevel_pri() function  can  be  used  before  calling
45       ddi_intr_add_handler()  to  help determine which type of interrupt han‐
46       dler can be used. Most device drivers are designed with  the  knowledge
47       that  supported  devices  always generate low level interrupts. On some
48       machines, however, interrupts are high-level above the scheduler  level
49       and  on  other machines they are not. Devices such as those those using
50       SBus interrupts or VME bus  level  6  or  7  interrupts  must  use  the
51       ddi_intr_get_hilevel_pri()  function to test the type of interrupt han‐
52       dler that can be used.
53

RETURN VALUES

55       The ddi_intr_get_hilevel_pri() function returns the priority value  for
56       a high-level interrupt.
57

CONTEXT

59       The  ddi_intr_get_hilevel_pri() function can be called from either user
60       or kernel non-interrupt context.
61

ATTRIBUTES

63       See attributes(5) for descriptions of the following attributes:
64
65
66
67
68       ┌─────────────────────────────┬─────────────────────────────┐
69       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
70       ├─────────────────────────────┼─────────────────────────────┤
71       │Interface Stability          │Committed                    │
72       └─────────────────────────────┴─────────────────────────────┘
73

SEE ALSO

75       attributes(5),      ddi_intr_add_handler(9F),       ddi_intr_alloc(9F),
76       ddi_intr_enable(9F),    ddi_intr_get_pri(9F),    ddi_intr_trigger_soft‐
77       int(9F), mutex(9F)
78
79
80       Writing Device Drivers
81
82
83
84SunOS 5.11                        07 Apr 2005     ddi_intr_get_hilevel_pri(9F)
Impressum