This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: enabling caching for dl_iterate_phdr()


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]