dlopen and memory order guarantees with threads

edA-qa mort-ora-y eda-qa@disemia.com
Sun Mar 4 07:57:00 GMT 2012

On 03/04/2012 08:30 AM, edA-qa mort-ora-y wrote:
> I might have to go tracking through the linux kernel code now to see
> what happens. What if the guarantee isn't actually there and we're all
> just getting lucky?  For example, on x86 we know we don't have this

I'll just reply to myself here. I'm reading the kernel docs, and
"cachetlb.txt" in particular (as you mentioned this, perhaps not the
doc, but the topic).

It is clear there are all sorts of functions for managing the MMU to
make the dlopen safe, so while not explicit that mmap uses them, it
would be really silly of it not to.

But overall I have to keep in mind then that dlopen is probably one of
the most expensive function calls one can make. Indeed it looks like it
could impact any thread whether it wants to use that loaded library or not.

edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20120304/0e10d7a5/attachment.sig>

More information about the Libc-help mailing list