tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Moving pthread_(cond|mutex) to libc
On Tue, 22 Jan 2013, Emmanuel Dreyfus 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.
It seems there is a conensus that pthread_(cond|mutex) should
move to libc so that libpthread could be freed from NOLOAD [See
http://mail-index.netbsd.org/tech-pkg/2013/01/19/msg010635.html].
I started looking at it and of course it raises a few
problems.
Please don't cite a thread from tech-pkg as consensus for
anything in the base system. You could use it as the start of a
discussion, but it's possible that a different conclusion will be
reached.
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.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index