Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/taskqueue.9
Show All 22 Lines | |||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 17, 2019 | .Dd June 6, 2020 | ||||
.Dt TASKQUEUE 9 | .Dt TASKQUEUE 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm taskqueue | .Nm taskqueue | ||||
.Nd asynchronous task execution | .Nd asynchronous task execution | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In sys/kernel.h | .In sys/kernel.h | ||||
▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | |||||
The | The | ||||
.Fn taskqueue_enqueue_timeout_sbt | .Fn taskqueue_enqueue_timeout_sbt | ||||
function provides finer control over the scheduling based on | function provides finer control over the scheduling based on | ||||
.Va sbt , | .Va sbt , | ||||
.Va pr , | .Va pr , | ||||
and | and | ||||
.Va flags , | .Va flags , | ||||
as detailed in | as detailed in | ||||
.Xr timeout 9 . | .Xr callout 9 . | ||||
Only non-fast task queues can be used for | Only non-fast task queues can be used for | ||||
.Va timeout_task | .Va timeout_task | ||||
scheduling. | scheduling. | ||||
If the | If the | ||||
.Va ticks | .Va ticks | ||||
argument is negative, the already scheduled enqueueing is not re-scheduled. | argument is negative, the already scheduled enqueueing is not re-scheduled. | ||||
Otherwise, the task is scheduled for enqueueing in the future, | Otherwise, the task is scheduled for enqueueing in the future, | ||||
after the absolute value of | after the absolute value of | ||||
▲ Show 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | |||||
(e.g., call malloc with the M_WAITOK flag.) | (e.g., call malloc with the M_WAITOK flag.) | ||||
.Pp | .Pp | ||||
Note that tasks queued on shared taskqueues such as | Note that tasks queued on shared taskqueues such as | ||||
.Va taskqueue_swi | .Va taskqueue_swi | ||||
may be delayed an indeterminate amount of time before execution. | may be delayed an indeterminate amount of time before execution. | ||||
If queueing delays cannot be tolerated then a private taskqueue should | If queueing delays cannot be tolerated then a private taskqueue should | ||||
be created with a dedicated processing thread. | be created with a dedicated processing thread. | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr callout 9 , | |||||
.Xr ithread 9 , | .Xr ithread 9 , | ||||
.Xr kthread 9 , | .Xr kthread 9 , | ||||
.Xr swi 9 | .Xr swi 9 | ||||
.Xr timeout 9 | |||||
.Sh HISTORY | .Sh HISTORY | ||||
This interface first appeared in | This interface first appeared in | ||||
.Fx 5.0 . | .Fx 5.0 . | ||||
There is a similar facility called work_queue in the Linux kernel. | There is a similar facility called work_queue in the Linux kernel. | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
This manual page was written by | This manual page was written by | ||||
.An Doug Rabson . | .An Doug Rabson . |