The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipc: Allow IPC path to be set dynamically

Uses cache for XRT_IPC_MSG_SOCK_FILE

authored by

Robbie Bridgewater and committed by
Jakob Bornecrantz
cc2e7b6d 74d82ff3

+8 -5
+1
CMakeLists.txt
··· 305 305 option(XRT_BUILD_DRIVER_SIMULATED "Enable simulated driver" ON) 306 306 307 307 option(XRT_BUILD_SAMPLES "Enable compiling sample code implementations that will not be linked into any final targets" ON) 308 + set(XRT_IPC_MSG_SOCK_FILENAME monado_comp_ipc CACHE STRING "Service socket filename") 308 309 309 310 # cmake-format: on 310 311
+1
src/xrt/include/xrt/xrt_config_build.h.cmake_in
··· 28 28 #cmakedefine XRT_FEATURE_TRACING 29 29 #cmakedefine XRT_FEATURE_CLIENT_DEBUG_GUI 30 30 #cmakedefine XRT_FEATURE_WINDOW_PEEK 31 + #cmakedefine XRT_IPC_MSG_SOCK_FILENAME "@XRT_IPC_MSG_SOCK_FILENAME@"
+1 -1
src/xrt/ipc/client/ipc_client_instance.c
··· 132 132 133 133 char sock_file[PATH_MAX]; 134 134 135 - int size = u_file_get_path_in_runtime_dir(IPC_MSG_SOCK_FILE, sock_file, PATH_MAX); 135 + int size = u_file_get_path_in_runtime_dir(XRT_IPC_MSG_SOCK_FILENAME, sock_file, PATH_MAX); 136 136 if (size == -1) { 137 137 IPC_ERROR(ipc_c, "Could not get socket file name"); 138 138 return -1;
+1 -1
src/xrt/ipc/server/ipc_server_mainloop_linux.c
··· 88 88 89 89 char sock_file[PATH_MAX]; 90 90 91 - int size = u_file_get_path_in_runtime_dir(IPC_MSG_SOCK_FILE, sock_file, PATH_MAX); 91 + int size = u_file_get_path_in_runtime_dir(XRT_IPC_MSG_SOCK_FILENAME, sock_file, PATH_MAX); 92 92 if (size == -1) { 93 93 U_LOG_E("Could not get socket file name"); 94 94 return -1;
+1 -1
src/xrt/ipc/shared/ipc_protocol.h
··· 19 19 #include "xrt/xrt_compositor.h" 20 20 #include "xrt/xrt_device.h" 21 21 #include "xrt/xrt_tracking.h" 22 + #include "xrt/xrt_config_build.h" 22 23 23 24 #include <sys/types.h> 24 25 25 - #define IPC_MSG_SOCK_FILE "monado_comp_ipc" 26 26 #define IPC_MAX_SWAPCHAIN_HANDLES 8 27 27 #define IPC_CRED_SIZE 1 // auth not implemented 28 28 #define IPC_BUF_SIZE 512 // must be >= largest message length in bytes
+1 -1
src/xrt/targets/ctl/main.c
··· 225 225 226 226 char sock_file[PATH_MAX]; 227 227 228 - int rt_size = u_file_get_path_in_runtime_dir(IPC_MSG_SOCK_FILE, sock_file, PATH_MAX); 228 + int rt_size = u_file_get_path_in_runtime_dir(XRT_IPC_MSG_SOCK_FILENAME, sock_file, PATH_MAX); 229 229 if (rt_size == -1) { 230 230 PE("Could not get socket file name"); 231 231 return -1;
+1
src/xrt/targets/service/configure_and_install_units.cmake
··· 7 7 set(conflicts @conflicts@) 8 8 set(exit_on_disconnect @exit_on_disconnect@) 9 9 set(service_path "monado-service") 10 + set(XRT_IPC_MSG_SOCK_FILENAME @XRT_IPC_MSG_SOCK_FILENAME@) 10 11 if(XRT_INSTALL_ABSOLUTE_SYSTEMD_UNIT_FILES) 11 12 set(service_path "${CMAKE_INSTALL_PREFIX}/@CMAKE_INSTALL_BINDIR@/${service_path}") 12 13 endif()
+1 -1
src/xrt/targets/service/monado.in.socket
··· 7 7 Conflicts=@conflicts@.socket 8 8 9 9 [Socket] 10 - ListenStream=%t/monado_comp_ipc 10 + ListenStream=%t/@XRT_IPC_MSG_SOCK_FILENAME@ 11 11 RemoveOnStop=true 12 12 13 13 [Install]