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
cmake_minimum_required(VERSION 3.9)
file(GLOB SOURCES *.c)
 
add_compile_options(-g -O0 -std=c++11)
 
include_directories(${CMAKE_SOURCE_DIR})
 
# add binary
add_executable(server server.cpp)
add_executable(client client.cpp)
 
add_executable(srv_rcv srv_recv.cpp)
add_executable(cli_snd cli_snd.cpp)
 
target_link_libraries(server PRIVATE memfd_shm pthread)
target_link_libraries(client PRIVATE memfd_shm pthread)
 
target_link_libraries(srv_rcv PRIVATE memfd_shm pthread)
target_link_libraries(cli_snd PRIVATE memfd_shm pthread)