shm: Allow to open shm in writable mode

This is a preparation for the shm ringbuffer, which needs to be able
to be writable by both sides, because there are atomic variables they
both need to modify.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2014-04-25 13:58:26 +02:00
parent 0cd4d3531a
commit 613177919f
3 changed files with 9 additions and 7 deletions

View file

@ -913,7 +913,7 @@ static pa_memimport_segment* segment_attach(pa_memimport *i, uint32_t shm_id) {
seg = pa_xnew0(pa_memimport_segment, 1);
if (pa_shm_attach_ro(&seg->memory, shm_id) < 0) {
if (pa_shm_attach(&seg->memory, shm_id, false) < 0) {
pa_xfree(seg);
return NULL;
}