April 2012
Intermediate to advanced
352 pages
8h
English
Taskqueues allow drivers to schedule the asynchronous execution of one or more functions at a later time. These functions are known as tasks. Taskqueues are primarily used for deferred work.
Taskqueues are like callouts except that you can’t specify the time to execute your functions.
Taskqueues work by having tasks queued on them. Intermittently, these tasks get executed.
FreeBSD runs and maintains four global taskqueues:
taskqueue_swiThe taskqueue_swi taskqueue executes its tasks in the context of an interrupt. Interrupt handlers typically defer their computationally expensive work to this taskqueue. This taskqueue lets interrupt handlers finish sooner, thereby reducing the amount of time spent with interrupts disabled. ...