This is the mail archive of the libc-alpha@sources.redhat.com 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: PATCH: Generic function descriptor


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.


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