Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jul 2015 00:32:41 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        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:  <20150701213241.GG2080@kib.kiev.ua>
In-Reply-To: <CAFMmRNzLL-K0kw_cj==kWpiocOcBLzxU2o6ONGaZRiv5tdSHxQ@mail.gmail.com>
References:  <CAFMmRNxLV0Uk9iT%2BU8rrPvn6aanSfEA6p577McM=_4xypaZr5w@mail.gmail.com> <CAFOYbckF7brPikTPaf%2BZhdm-R9d0WzygY9-eUxnrmi3p%2BBFBoQ@mail.gmail.com> <CAFMmRNzLL-K0kw_cj==kWpiocOcBLzxU2o6ONGaZRiv5tdSHxQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 ?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150701213241.GG2080>