Re: How should a driver shutdown a taskqueue on detach?

From: Eric Joyner <ricera10_at_gmail.com>
Date: Wed, 01 Jul 2015 21:50:00 +0000
Or like, "taskqueue_enqueue_if_not_draining()" ? :p

On Wed, Jul 1, 2015 at 2:32 PM Konstantin Belousov <kostikbel_at_gmail.com>
wrote:

> On Wed, Jul 01, 2015 at 05:09:27PM -0400, Ryan Stone wrote:
> > On Wed, Jul 1, 2015 at 4:58 PM, Jack Vogel <jfvogel_at_gmail.com> wrote:
> >
> > > But if you've disabled interrupts why would an "interrupt-handling
> task"
> > > even run??
> > >
> > > Jack
> > >
> >
> > There's a race.  The task could have already have been scheduled by a
> > previous interrupt and could be running while I am trying to disable
> > interrupts and drain the taskqueue.
>
> 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 ?
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Wed Jul 01 2015 - 19:50:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC