Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2014 16:11:56 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Benjamin Kaduk <bjk@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: callout(9) really this complicated?
Message-ID:  <53C293AC.9020006@selasky.org>
In-Reply-To: <alpine.GSO.1.10.1407111127190.21571@multics.mit.edu>
References:  <20140704041521.GW45513@funkthat.com> <201407091211.47642.jhb@freebsd.org> <20140710061955.GT45513@funkthat.com> <201407101530.32533.jhb@freebsd.org> <20140711023749.GA45513@funkthat.com> <alpine.GSO.1.10.1407111127190.21571@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/11/14 17:28, Benjamin Kaduk wrote:
> [large pile of context trimmed]
>
> On Thu, 10 Jul 2014, John-Mark Gurney wrote:
>
>> Ok, I'm so confused now that I will NOT be creating a patch, and unless
>> someone comes up w/ a patch to clarify it, I will add to the description
>> that there are numerous misleading statements in this man page and link
>> them to this thread...
>
> I have saved jhb's messages in this thread and added to my TODO list to
> make a pass through this man page.  There's quite a few things in front
> of this in my list, though -- I don't expect to have anything for maybe
> a month.
>

Hi,

One additional comment:

The "callout_drain()" function also ensures that not only the function 
callback is no longer called/executing, but also that the mutex which is 
passed as an argument to callout_init_mtx() is no longer being used.

Maybe the "start/stop/drain" theorem could be explained in general 
somewhere, because the USB stack works similarly, and I believe it is 
the correct way to implement more advanced callback API's in a 
multithreaded system.

--HPS




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