shm implemented as memfd syscall
zhangmeng
2023-07-27 157b3411dd123694ca29dd80fe9ecc683958ccab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _trans_fd_shm_h_
#define _trans_fd_shm_h_
 
#ifndef HIDDENAPI
#define HIDDENAPI __attribute__((visibility("hidden")))
#endif
 
#ifdef __cplusplus
extern "C" {
#endif
 
// send fds
int sendfd(int conn, int fd[], int fds);
// recv fds, fd pre-allocated buffer, fds buffer size
int recvfd(int conn, int fd[], int fds);
 
#ifdef __cplusplus
}
#endif
 
#endif