This is the mail archive of the libc-help@sourceware.org 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: malloc/free and priority inheritance?


On 03.04.2013 01:06, Stanislav Meduna wrote:

> I am hunting a possible priority inversion case and I would like
> to ask whether the malloc/free from glibc (particularly 2.11.3
> used in Debian 6 or newer) uses priority inheritance mutexes
> when doing the necessary locking.

OK, after code-review it looks that it does not and neither
do the condition variables and semaphores. This is bad...

I think I can work around the malloc/free with some linker magic
and wrapper functions (we don't allocate much so the performance
hit is tolerable), but anyone here has a pointer to priority
inheritance aware condition variables implemented using futexes
outside of glibc?

I'd like to avoid patching glibc, as this is always a quite risky
challenge and we already have production code. On the other hand
I only need to support RT-Linux on x86 and ARM and I don't need
the assembly-optimized versions.

Thanks
-- 
                                        Stano


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