[DTrace-devel] [PATCH v2 07/11] htab reduction: kernpath

Kris Van Hees kris.van.hees at oracle.com
Wed Oct 27 07:06:50 PDT 2021


On Wed, Oct 27, 2021 at 02:52:31PM +0100, Nick Alcock wrote:
> On 22 Oct 2021, Kris Van Hees told this:

<<< some stuff skipped >>

> Agreed. I *am* kind of being consistent here: they're all called
> del_FOO, where FOO is the sort of thing being deleted (where _del just
> "deletes" the hash buckets themselves by resetting their link pointers).

> I'm happy to make them all consistently named *_del_el or whatever if
> people think that would be clearer. (I vacillated back and forth on this
> at least twice.)

I would keep the distinct names.  The naming is in the code that uses the
htab and not in the htab code itself, which only cares about calling the
del callback function reagrdless of whether it is the standard one or a
custom one.  Since some source code files might have muyltiple htabs to deal
with and they may have their own del-needs, distinct names might even be
necessary in some cases.

	Kris



More information about the DTrace-devel mailing list