mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
memimport: Support memfd blocks
To transfer memfd-backed blocks without passing their fd every time, thus minimizing overhead and avoiding fd leaks, a command is sent with the memfd fd as ancil data very early on. This command has an ID that uniquely identifies the memfd region. Further memfd block references are then exclusively done using this ID. This commit implements the details of such 'permanent' mappings on the receiving end, using memimport segments. Suggested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
73e86b1cb1
commit
f8714af56b
6 changed files with 113 additions and 23 deletions
|
|
@ -46,7 +46,7 @@ typedef struct pa_shm {
|
|||
} pa_shm;
|
||||
|
||||
int pa_shm_create_rw(pa_shm *m, pa_mem_type_t type, size_t size, mode_t mode);
|
||||
int pa_shm_attach(pa_shm *m, unsigned id, bool writable);
|
||||
int pa_shm_attach(pa_shm *m, pa_mem_type_t type, unsigned id, int memfd_fd, bool writable);
|
||||
|
||||
void pa_shm_punch(pa_shm *m, size_t offset, size_t size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue