shm implemented as memfd syscall
cheliequan
2022-12-27 54951dfb930bea890aef14be02236f81b3a19f2e
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
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)
 
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
             )