This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: malloc() and spinlocks
> Isn't it better to have the fast inline non-recursive mutices provided
> for _LIBC only use by the threading library (this could be something like
> lll_mutex_lock for nptl and something similar for linuxthreads)?
I agree it would be better to have this in a more general form. If
you (or anyone) provide(s) a patch with lll_mutex_lock... etc. macros,
I'll gladly adapt thread-m.h.
> The spinlocks below inline quite a lot of code, ideally it should be just
> lock; xaddl; testl; jne lab_in_other_subsection
I believe only mutex_lock is non-optimal and inlines a sizeable piece
of code. But it would be good to have this for non-i386 architectures
too.
Regards,
Wolfram.