Subject: Re: Runtime loading of libpthread
To: Martin Husemann <email@example.com>
From: Ceri Storey <firstname.lastname@example.org>
Date: 12/21/2003 22:41:26
On Sun, Dec 21, 2003 at 10:59:43PM +0100, Martin Husemann wrote:
> Consider all the state kept in libc, which is different in a threaded from
> a non-threaded world. At pthread load time, you would have to convert the
> state for all cases correctly, completely, and without deadlocks.
Sure, I can appreciate that. Writing a thread-safe malloc without any
form of intra-thread protection would be hairy at best.
However, I'd have expected that when the pthread library was loaded, the
runtime linker would then use the strong aliases defined in libpthread
to override those in libc (eg: __libc_mutex_init).
Of course, then you have the general problem of having data from one
version of a library being passed to another, as you said. It's possible,
I'm sure, but not really worth it.
Ceri Storey <email@example.com>