Monado OpenXR Runtime
Loading...
Searching...
No Matches
ipc_client_connection.h
Go to the documentation of this file.
1// Copyright 2020-2023, Collabora, Ltd.
2// Copyright 2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief More-internal client side code.
7 * @author Pete Black <pblack@collabora.com>
8 * @author Jakob Bornecrantz <jakob@collabora.com>
9 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
10 * @ingroup ipc_client
11 */
12
13#pragma once
14
15#include "xrt/xrt_results.h"
16#include "ipc_client.h"
18
19
20/*!
21 * Set up the basics of the client connection: socket and shared mem
22 * @param ipc_c Empty IPC connection struct
23 * @param log_level Log level for IPC messages
24 * @param icci Which socket to connect to, and on Windows which service to launch, required except on Android
25 * @param i_info Instance info to send to server
26 * @return XRT_SUCCESS on success
27 *
28 * @ingroup ipc_client
29 */
32 enum u_logging_level log_level,
33 const struct ipc_client_connection_info *icci,
34 const struct xrt_instance_info *i_info);
35
36/*!
37 * Locks the connection, allows sending complex messages.
38 *
39 * @param ipc_c The IPC connection to lock.
40 *
41 * @ingroup ipc_client
42 */
43static inline void
45{
46 os_mutex_lock(&ipc_c->mutex);
47}
48
49/*!
50 * Unlocks the connection.
51 *
52 * @param ipc_c A locked IPC connection to unlock.
53 *
54 * @ingroup ipc_client
55 */
56static inline void
58{
59 os_mutex_unlock(&ipc_c->mutex);
60}
61
62/*!
63 * Tear down the basics of the client connection: socket and shared mem
64 * @param ipc_c initialized IPC connection struct
65 *
66 * @ingroup ipc_client
67 */
68void
u_logging_level
Logging level enum.
Definition u_logging.h:45
static void ipc_client_connection_lock(struct ipc_connection *ipc_c)
Locks the connection, allows sending complex messages.
Definition ipc_client_connection.h:44
static void ipc_client_connection_unlock(struct ipc_connection *ipc_c)
Unlocks the connection.
Definition ipc_client_connection.h:57
void ipc_client_connection_fini(struct ipc_connection *ipc_c)
Tear down the basics of the client connection: socket and shared mem.
Definition ipc_client_connection.c:447
xrt_result_t ipc_client_connection_init(struct ipc_connection *ipc_c, enum u_logging_level log_level, const struct ipc_client_connection_info *icci, const struct xrt_instance_info *i_info)
Set up the basics of the client connection: socket and shared mem.
Definition ipc_client_connection.c:374
enum xrt_result xrt_result_t
Result type used across Monado.
Common client side code.
Interface for IPC client instance code.
Connection parameters chosen by the target that loads the IPC client.
Definition ipc_client_interface.h:30
Connection.
Definition ipc_client.h:62
Information provided by the application at instance create time.
Definition xrt_instance.h:98
Internal result type for XRT.