summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2016-09-15 18:26:23 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2016-09-15 18:26:23 +0000
commit323faad4281b4bac0091d5d6b08cd8d3a10d21e5 (patch)
tree361350c45470e286e49b9f35782de17eb37b204d
parentbfc46a5fe7a0833e1612d28e4f30a157ac901514 (diff)
tweak previous;
-rw-r--r--share/man/man9/usb_add_task.923
1 files changed, 14 insertions, 9 deletions
diff --git a/share/man/man9/usb_add_task.9 b/share/man/man9/usb_add_task.9
index 861651d79b0..21ded35a8fd 100644
--- a/share/man/man9/usb_add_task.9
+++ b/share/man/man9/usb_add_task.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: usb_add_task.9,v 1.1 2016/09/15 17:53:38 awolk Exp $
+.\" $OpenBSD: usb_add_task.9,v 1.2 2016/09/15 18:26:22 jmc Exp $
.\"
.\" Copyright (c) 2016 Adam Wolk <awolk@openbsd.org>
.\"
@@ -38,8 +38,10 @@
.Fn usb_init_task "struct usbd_device *dev" "void (*fn)(void *)" "void *arg" "char type"
.Sh DESCRIPTION
The USB stack provides an API to manage task execution in a thread context at
-the soonest opportunity. There are three different task queues that are
-executed on two separate threads. All tasks executed via the USB task API are
+the soonest opportunity.
+There are three different task queues
+that are executed on two separate threads.
+All tasks executed via the USB task API are
serialized with USB events such as device detachments.
.Pp
The
@@ -89,10 +91,11 @@ with the argument specified by
.Fa arg .
The
.Fa type
-of the task determines the queue and thread that will be used for its execution:
+of the task determines the queue
+and thread that will be used for its execution:
.Bl -tag -width "USB_TASK_TYPE_EXPLORE" -offset indent
.It Dv USB_TASK_TYPE_GENERIC
-Tasks used for general work that needs to happen in a process context.
+Tasks used for general work that need to happen in a process context.
.It Dv USB_TASK_TYPE_EXPLORE
Device discovery tasks exploring the tree from the root.
.It Dv USB_TASK_TYPE_ABORT
@@ -104,11 +107,13 @@ Most drivers will only define tasks of type
.Dv USB_TASK_TYPE_GENERIC .
Note that
.Dv USB_TASK_TYPE_ABORT
-tasks are only used by Host Controller Drivers and should never be used by
-drivers. Once initialised, the
+tasks are only used by host controller drivers
+and should never be used by drivers.
+Once initialised, the
.Fa task
-can be used repeatedly in the API functions listed above and does not need to be
-reinitialised unless the function called and/or its argument must change.
+can be used repeatedly in the API functions listed above
+and does not need to be reinitialised
+unless the function called and/or its argument must change.
.Sh CONTEXT
.Fn usb_task_add
can be called from any context.