Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102751608
D33476.id100086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33476.id100086.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D33476: ithread(9): update the example of swi_add()
Attached
Detach File
Event Timeline
Log In to Comment