Page MenuHomeFreeBSD

D33476.id100086.diff
No OneTemporary

D33476.id100086.diff

Index: share/man/man9/ithread.9
===================================================================
--- share/man/man9/ithread.9
+++ share/man/man9/ithread.9
@@ -158,32 +158,33 @@
.Fn intr_event_add_handler .
.Bd -literal -offset indent
int
-swi_add(struct ithd **ithdp, const char *name, driver_intr_t handler,
- void *arg, int pri, enum intr_type flags, void **cookiep)
+swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler,
+ void *arg, int pri, enum intr_type flags, void **cookiep)
{
- struct proc *p;
- struct ithd *ithd;
- int error;
+ struct intr_event *ie;
+ int error = 0;
if (flags & INTR_ENTROPY)
return (EINVAL);
- ithd = (ithdp != NULL) ? *ithdp : NULL;
+ ie = (eventp != NULL) ? *eventp : NULL;
- if (ithd != NULL) {
- if ((ithd->it_flags & IT_SOFT) == 0)
- return(EINVAL);
+ if (ie != NULL) {
+ if (!(ie->ie_flags & IE_SOFT))
+ return (EINVAL);
} else {
- error = ithread_create(&ithd, pri, IT_SOFT, NULL, NULL,
- "swi%d:", pri);
+ error = intr_event_create(&ie, NULL, IE_SOFT, 0,
+ NULL, NULL, NULL, swi_assign_cpu, "swi%d:", pri);
if (error)
return (error);
-
- if (ithdp != NULL)
- *ithdp = ithd;
+ if (eventp != NULL)
+ *eventp = ie;
+ }
+ if (handler != NULL) {
+ error = intr_event_add_handler(ie, name, NULL, handler, arg,
+ PI_SWI(pri), flags, cookiep);
}
- return (ithread_add_handler(ithd, name, handler, arg, pri + PI_SOFT,
- flags, cookiep));
+ return (error);
}
.Ed
.Sh ERRORS

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 4:48 PM (1 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14682269
Default Alt Text
D33476.id100086.diff (1 KB)

Event Timeline