MCPcopy Create free account
hub / github.com/F-Stack/f-stack / intr_priority

Function intr_priority

freebsd/kern/kern_intr.c:119–154  ·  view source on GitHub ↗

Map an interrupt type to an ithread priority. */

Source from the content-addressed store, hash-verified

117
118/* Map an interrupt type to an ithread priority. */
119u_char
120intr_priority(enum intr_type flags)
121{
122 u_char pri;
123
124 flags &= (INTR_TYPE_TTY | INTR_TYPE_BIO | INTR_TYPE_NET |
125 INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV);
126 switch (flags) {
127 case INTR_TYPE_TTY:
128 pri = PI_TTY;
129 break;
130 case INTR_TYPE_BIO:
131 pri = PI_DISK;
132 break;
133 case INTR_TYPE_NET:
134 pri = PI_NET;
135 break;
136 case INTR_TYPE_CAM:
137 pri = PI_DISK;
138 break;
139 case INTR_TYPE_AV:
140 pri = PI_AV;
141 break;
142 case INTR_TYPE_CLK:
143 pri = PI_REALTIME;
144 break;
145 case INTR_TYPE_MISC:
146 pri = PI_DULL; /* don't care */
147 break;
148 default:
149 /* We didn't specify an interrupt level. */
150 panic("intr_priority: no interrupt type in flags");
151 }
152
153 return pri;
154}
155
156/*
157 * Update an ithread based on the associated intr_event.

Callers 14

apb_setup_intrFunction · 0.85
qca955x_pci_setup_intrFunction · 0.85
ar71xx_pci_setup_intrFunction · 0.85
ar724x_pci_setup_intrFunction · 0.85
apb_setup_intrFunction · 0.85
cpu_establish_hardintrFunction · 0.85
cpu_establish_softintrFunction · 0.85
ciu_setup_intrFunction · 0.85
mtk_pci_setup_intrFunction · 0.85
gt_pci_setup_intrFunction · 0.85
cpu_establish_hardintrFunction · 0.85

Calls 1

panicFunction · 0.70

Tested by

no test coverage detected