- Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
PI_DISKLOW. While here, rename PI_TTYLOW to PI_TTY. - Add a macro PI_SWI() that takes a SWI_* constant as an argument and returns the suitable thread priority.
This commit is contained in:
parent
c9a8cba456
commit
d330520523
@ -130,22 +130,18 @@ intr_priority(enum intr_type flags)
|
||||
INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV);
|
||||
switch (flags) {
|
||||
case INTR_TYPE_TTY:
|
||||
pri = PI_TTYLOW;
|
||||
pri = PI_TTY;
|
||||
break;
|
||||
case INTR_TYPE_BIO:
|
||||
/*
|
||||
* XXX We need to refine this. BSD/OS distinguishes
|
||||
* between tape and disk priorities.
|
||||
*/
|
||||
pri = PI_DISK;
|
||||
break;
|
||||
case INTR_TYPE_NET:
|
||||
pri = PI_NET;
|
||||
break;
|
||||
case INTR_TYPE_CAM:
|
||||
pri = PI_DISK; /* XXX or PI_CAM? */
|
||||
pri = PI_DISK;
|
||||
break;
|
||||
case INTR_TYPE_AV: /* Audio/video */
|
||||
case INTR_TYPE_AV:
|
||||
pri = PI_AV;
|
||||
break;
|
||||
case INTR_TYPE_CLK:
|
||||
@ -1082,7 +1078,7 @@ swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler,
|
||||
*eventp = ie;
|
||||
}
|
||||
error = intr_event_add_handler(ie, name, NULL, handler, arg,
|
||||
(pri * RQ_PPQ) + PI_SOFT, flags, cookiep);
|
||||
PI_SWI(pri), flags, cookiep);
|
||||
if (error)
|
||||
return (error);
|
||||
if (pri == SWI_CLOCK) {
|
||||
@ -1656,18 +1652,13 @@ db_dump_intrhand(struct intr_handler *ih)
|
||||
case PI_AV:
|
||||
db_printf("AV ");
|
||||
break;
|
||||
case PI_TTYHIGH:
|
||||
case PI_TTYLOW:
|
||||
case PI_TTY:
|
||||
db_printf("TTY ");
|
||||
break;
|
||||
case PI_TAPE:
|
||||
db_printf("TAPE");
|
||||
break;
|
||||
case PI_NET:
|
||||
db_printf("NET ");
|
||||
break;
|
||||
case PI_DISK:
|
||||
case PI_DISKLOW:
|
||||
db_printf("DISK");
|
||||
break;
|
||||
case PI_DULL:
|
||||
|
@ -85,14 +85,12 @@
|
||||
|
||||
#define PI_REALTIME (PRI_MIN_ITHD + 0)
|
||||
#define PI_AV (PRI_MIN_ITHD + 4)
|
||||
#define PI_TTYHIGH (PRI_MIN_ITHD + 8)
|
||||
#define PI_TAPE (PRI_MIN_ITHD + 12)
|
||||
#define PI_NET (PRI_MIN_ITHD + 16)
|
||||
#define PI_DISK (PRI_MIN_ITHD + 20)
|
||||
#define PI_TTYLOW (PRI_MIN_ITHD + 24)
|
||||
#define PI_DISKLOW (PRI_MIN_ITHD + 28)
|
||||
#define PI_DULL (PRI_MIN_ITHD + 32)
|
||||
#define PI_SOFT (PRI_MIN_ITHD + 36)
|
||||
#define PI_NET (PRI_MIN_ITHD + 8)
|
||||
#define PI_DISK (PRI_MIN_ITHD + 12)
|
||||
#define PI_TTY (PRI_MIN_ITHD + 16)
|
||||
#define PI_DULL (PRI_MIN_ITHD + 20)
|
||||
#define PI_SOFT (PRI_MIN_ITHD + 24)
|
||||
#define PI_SWI(x) (PI_SOFT + (x) * RQ_PPQ)
|
||||
|
||||
#define PRI_MIN_KERN (64)
|
||||
#define PRI_MAX_KERN (PRI_MIN_REALTIME - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user