The open source OpenXR runtime
0
fork

Configure Feed

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

ipc/server: Add Android main entry point which receives fd.

+36
+10
src/xrt/ipc/server/ipc_server.h
··· 203 203 ipc_server_main(int argc, char **argv); 204 204 205 205 /*! 206 + * Android entry point to the IPC server process. 207 + * 208 + * @ingroup ipc_server 209 + */ 210 + #ifdef XRT_OS_ANDROID 211 + int 212 + ipc_server_main_android(int fd); 213 + #endif 214 + 215 + /*! 206 216 * Called by client threads to manage global state 207 217 * 208 218 * @ingroup ipc_server
+26
src/xrt/ipc/server/ipc_server_process.c
··· 1230 1230 1231 1231 return ret; 1232 1232 } 1233 + 1234 + #ifdef XRT_OS_ANDROID 1235 + int 1236 + ipc_server_main_android(int fd) 1237 + { 1238 + struct ipc_server *s = U_TYPED_CALLOC(struct ipc_server); 1239 + U_LOG_D("Created IPC server on fd %d", fd); 1240 + 1241 + int ret = init_all(s); 1242 + if (ret < 0) { 1243 + free(s); 1244 + return ret; 1245 + } 1246 + 1247 + init_server_state(s); 1248 + start_client_listener_thread(s, fd); 1249 + ret = main_loop(s); 1250 + 1251 + teardown_all(s); 1252 + free(s); 1253 + 1254 + U_LOG_E("Server exiting! '%i'", ret); 1255 + 1256 + return ret; 1257 + } 1258 + #endif