Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Jul 2015 21:50:00 +0000
From:      Eric Joyner <ricera10@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>, Ryan Stone <rysto32@gmail.com>
Cc:        Jack Vogel <jfvogel@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: How should a driver shutdown a taskqueue on detach?
Message-ID:  <CA%2Bb0zg_KfXp65McpfSz0_oUWnKnL=O-BKs6EUAQXYUy1MH5L0Q@mail.gmail.com>
In-Reply-To: <20150701213241.GG2080@kib.kiev.ua>
References:  <CAFMmRNxLV0Uk9iT%2BU8rrPvn6aanSfEA6p577McM=_4xypaZr5w@mail.gmail.com> <CAFOYbckF7brPikTPaf%2BZhdm-R9d0WzygY9-eUxnrmi3p%2BBFBoQ@mail.gmail.com> <CAFMmRNzLL-K0kw_cj==kWpiocOcBLzxU2o6ONGaZRiv5tdSHxQ@mail.gmail.com> <20150701213241.GG2080@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Or like, "taskqueue_enqueue_if_not_draining()" ? :p

On Wed, Jul 1, 2015 at 2:32 PM Konstantin Belousov <kostikbel@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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bb0zg_KfXp65McpfSz0_oUWnKnL=O-BKs6EUAQXYUy1MH5L0Q>