From 55ca93469cfaa5ca1d9b6e4c164b23ef55763eb5 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 7 Aug 2021 13:46:38 +0200 Subject: 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. --- include/util/shm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/util/shm.h b/include/util/shm.h index fb67b711..331532fc 100644 --- a/include/util/shm.h +++ b/include/util/shm.h @@ -1,7 +1,10 @@ #ifndef UTIL_SHM_H #define UTIL_SHM_H +#include + 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 -- cgit v1.2.3