This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: malloc/free and priority inheritance?
- From: Stanislav Meduna <stano at meduna dot org>
- To: libc-help at sourceware dot org
- Cc: "linux-rt-users at vger dot kernel dot org" <linux-rt-users at vger dot kernel dot org>
- Date: Thu, 04 Apr 2013 14:59:47 +0200
- Subject: Re: malloc/free and priority inheritance?
- References: <515B647C dot 3080505 at meduna dot org>
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