mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
util/shm: add allocate_shm_file_pair
This function behaves like allocate_shm_file, except it also returns a read-only FD. This is useful to share the same segment of memory with many Wayland clients.
This commit is contained in:
parent
38cd1b4f4f
commit
55ca93469c
2 changed files with 42 additions and 5 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#ifndef UTIL_SHM_H
|
||||
#define UTIL_SHM_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
int create_shm_file(void);
|
||||
int allocate_shm_file(size_t size);
|
||||
bool allocate_shm_file_pair(size_t size, int *rw_fd, int *ro_fd);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue