This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PATCH: Generic function descriptor
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Thu, 3 Apr 2003 15:44:42 -0800
- Subject: Re: PATCH: Generic function descriptor
- References: <20030403132429.A15233@lucon.org> <3E8CACE4.1030104@redhat.com>
On Thu, Apr 03, 2003 at 01:51:32PM -0800, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> H. J. Lu wrote:
> > Both ia64 and hppa use function descriptor. They can share the same
> > code. I updated my old patch against today's CVS. It works find on ia64.
>
> If you want to work on this then do it right. The current ia64 code is
> nothing but a stop-gap solution. It is sow and hideous.
>
> A correct implementation should at the very least uses futexes when
> available. Much better is a lockless implementation. The general
> lookup code is thread- and signal-safe. It's only the descriptor
> handling which has problems. One possibility is to in principal emulate
> load lock/storage conditional (ia64 has now a cmp8xchg16 instruction).
>
I am not sure how feasible it is. That piece of code can be called from
anywhere. I don't know if it can use any library functions since they
may depend on it themselves. It can only use system calls. It needs
the lock for updating some data structure. The only issue I am aware of
is
ts.tv_sec = 0;
ts.tv_nsec = 1*1000*1000;
__nanosleep (&ts, NULL);
doesn't put the process into sleep under 2.4 kernel. The minimum one
should be 2000001 nano seconds.
H.J.