This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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: dlopen handles and multiple threads


On Thu, Jul 03, 2014 at 11:20:58AM +0000, Matthew Fortune wrote:
> > I believe all three are valid assuming the handle/function pointer is
> > safely passed between the threads. Is there a reason you believe they
> > may not be valid?
> 
> No I have no reason to believe they are invalid. I was just hoping they
> might be for a reason that I did not know! This is related to the MIPS
> ABI work which is progress for transitioning O32 from FR0 to FR1.

Do you have a draft document on this design I can look at?

> It came to light that performing a mode switch during dlopen on one thread
> would not update the mode on any other thread sharing the address space. The
> mode change would be a pre-requisite of executing any code in the newly
> opened library. If a different thread accesses that code in its
> pre-existing mode then it would fail.

If the mode has not something changed at each call between functions
where the ABI differs, but something that you can just set globally
when FR1 code is loaded, why isn't it just always set for FR1?

If it is something that has to be set at call time, then why would
dlopen need to set it, and how would doing so not break existing FR0
code in the caller?

Rich


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