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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required(VERSION 3.9)
file(GLOB SOURCES *.c)
 
include_directories(../include)
 
# add binary
add_executable(sample_create sample_create.c)
add_executable(sample_open sample_open.c)
add_executable(test_list_in_shm test_list_in_shm.c)
add_executable(shmht_mytests shmht_mytests.c)
add_executable(ipc_server ipc_server.c)
add_executable(ipc_client ipc_client.c)
 
target_link_libraries(sample_create
                  PRIVATE 
                  memfd
             )
target_link_libraries(sample_open
                  PRIVATE 
                  memfd
             )
 
target_link_libraries(test_list_in_shm
                  PRIVATE 
                  memfd
              pthread
             )
 
target_link_libraries(shmht_mytests
                  PRIVATE 
                  memfd
              pthread
             )
target_link_libraries(ipc_server
                  PRIVATE 
                  memfd
              pthread
                      libipc_server
             )
target_link_libraries(ipc_client
                  PRIVATE 
                  memfd
              pthread
              libipc_client
             )