callout(9) really this complicated?

Hans Petter Selasky hps at selasky.org
Sun Jul 13 14:11:52 UTC 2014


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



More information about the freebsd-arch mailing list