How should a driver shutdown a taskqueue on detach?

Jack Vogel jfvogel at gmail.com
Wed Jul 1 22:30:00 UTC 2015


Ya, that seems elegant.

Jack


On Wed, Jul 1, 2015 at 3:28 PM, Ryan Stone <rysto32 at gmail.com> wrote:

> On Wed, Jul 1, 2015 at 5:32 PM, Konstantin Belousov <kostikbel at gmail.com>
> wrote:
>
>> Do you mean, you want some KPI like
>>         boolean taskqueue_is_draining(struct taskqueue *p);
>> so that e.g. executed task could see if it is executing in the
>> shutdown state ?
>
>
> I'd prefer a KPI that stops a taskqueue from accepting new tasks (and
> drops attempts to enqueue on the floor).  Then I could do something like:
>
> taskqueue_stop()
> disable_interrupts()
> taskqueue_drain_all()
> taskqueue_free()
>


More information about the freebsd-current mailing list