enabling caching for dl_iterate_phdr()

Roland McGrath roland@redhat.com
Tue Dec 23 22:24:00 GMT 2003


> Would it be possible to add two atomic counters, dl_load_additions and
> dl_load_removals, which would get incremented whenever something is a
> phdr is added to/removed from the list that is traversed by
> dl_iterate_phdr()?

What interface do you propose for exposing such counters?
We won't be adding any published interfaces using variables.

> Any opinions?  I guess the alternative that was mentioned in the past
> was to use callbacks, but that seems very dangerous in regards to
> deadlock etc.

If your callback functions do nothing but increment atomic counters of your
own, then there is no problem.



More information about the Libc-hacker mailing list