On Wed Nov 29 14:41:21 2017, michal wrote: > The two for loops you mentioned do different things. However, I agree > the purpose of this code is hard to grasp in its current form. > > I am intentionally not telling you what the code does; please look at > the few refactoring commits I just pushed to rt46718 and let me know if > it is clear now. If it is not, even more comments are likely due. Ah, it's much better now. Just one nit - why struct and not va_list (or just pass all four arguments) for the callback? The callback_data makes sense when you need to store the callback_data in an async structure. (Actually it's not a 'callback' but a function that does things directly, right?)