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

@ -35,7 +35,7 @@ typedef struct pa_shm {
} pa_shm;
int pa_shm_create_rw(pa_shm *m, size_t size, bool shared, mode_t mode);
int pa_shm_attach_ro(pa_shm *m, unsigned id);
int pa_shm_attach(pa_shm *m, unsigned id, bool writable);
void pa_shm_punch(pa_shm *m, size_t offset, size_t size);