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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

H. J. Lu wrote:

> 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.

I don't suggest adding more function calls.  The cmpxchg is an inline
operation.


> It needs the lock for updating some data structure.

There is no need for locking to synchronize updating the function
descriptor data structures.  If more than one thread at the same time
finds no more descriptor available let them both allocate more memory
and use both memory blocks or discard one.  This situation will be so
infrequent that the additional overhead is completely neglectable.


You don't have to do it, I might look at it soon.  But your unification
patch won't go in as is.  The improved function descriptor handling
might very well require enough changes to make it impossible to share it
with HPPA and its pathetic instruction set.


> The only issue I am aware of
> is
> 
> 	ts.tv_sec = 0;
> 	ts.tv_nsec = 1*1000*1000; 
> 	__nanosleep (&ts, NULL);

The use of nanosleep alone can be fatal.  The current code is not 100%
correct.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+jMuN2ijCOnn/RHQRAqhTAJsEXdNsnJSlu6mqp6zUmeiWlshOBACgzERE
D+xZQVo0s04/hM0JGMSTGMo=
=RYKw
-----END PGP SIGNATURE-----


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