tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Moving pthread_(cond|mutex) to libc

Alan Barrett <> wrote:

> > Starting with NetBSD 6.0, libpthread is cursed with the NOLOAD 
> > flag, which means it cannot be loaded by dlopen(). The problem 
> > is that we can easily get to dlopen'able modules that do not 
> > use pthreads, but are linked to libraries that are linked with 
> > -lpthread. Such module cannot be loaded anymore in NetBSD 6.0.
> Yes.  And such modules would not work properly even if they were 
> allowed to be loaded.

Why would they? 

> Also, please lets get the overall design clarified before you 
> write any code.  I'd like to see a description of what would 
> happen if a program starts without pthreads, creates and uses some 
> condvars and mutexes, and then loads libpthread and continues 
> using the already-created condvars and mutexes.

The proposed patch address that problem, by having libc stubs that fills
mutexes and condvars fields.

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index