This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: robust pthread_mutex_t in shared memory
- From: Florian Weimer <fweimer at redhat dot com>
- To: Michal Vaško <mvasko at cesnet dot cz>
- Cc: libc-help at sourceware dot org
- Date: Mon, 15 Apr 2019 11:58:55 +0200
- Subject: Re: robust pthread_mutex_t in shared memory
- References: <462b-5cb45400-53-5702ea80@186919779>
* Michal Vaško:
> I have a use-case of process-shared mutexes in shared memory. The
> memory is even remapped at times but never while the lock is held. I
> have encountered some strange behavior and while debugging I wrote a
> fairly simple program that I would like to ask for help with. I would
> also appreciate if someone could tell me (or point me to where it is
> documented) what are the restrictions when using mutexes this way such
> as whether the memory can be remapped while a lock in it is held
> (probably not possible for robust mutexes, what about the default
> ones?) or similar ones.
What do you mean by “remapped”? munmap followed by another mmap from
the backing file, possibly resulting in a different address?
Thanks,
Florian