Monado OpenXR Runtime
Loading...
Searching...
No Matches
ipc_server.h
Go to the documentation of this file.
1// Copyright 2020-2023, Collabora, Ltd.
2// Copyright 2025-2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Common server 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_server
11 */
12
13#pragma once
14
15#include "xrt/xrt_compiler.h"
16#include "xrt/xrt_limits.h"
17#include "xrt/xrt_space.h"
18#include "xrt/xrt_system.h"
19
20#include "os/os_threading.h"
21
22#include "util/u_logging.h"
23#include "util/u_hashmap.h"
24
25#include "shared/ipc_protocol.h"
27
29
30#include <stdio.h>
31
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37/*
38 *
39 * Logging
40 *
41 */
42
43#define IPC_TRACE(d, ...) U_LOG_IFL_T(d->log_level, __VA_ARGS__)
44#define IPC_DEBUG(d, ...) U_LOG_IFL_D(d->log_level, __VA_ARGS__)
45#define IPC_INFO(d, ...) U_LOG_IFL_I(d->log_level, __VA_ARGS__)
46#define IPC_WARN(d, ...) U_LOG_IFL_W(d->log_level, __VA_ARGS__)
47#define IPC_ERROR(d, ...) U_LOG_IFL_E(d->log_level, __VA_ARGS__)
48
49#define IPC_CHK_AND_RET(S, ...) U_LOG_CHK_AND_RET((S)->log_level, __VA_ARGS__)
50#define IPC_CHK_WITH_GOTO(S, ...) U_LOG_CHK_WITH_GOTO((S)->log_level, __VA_ARGS__)
51#define IPC_CHK_WITH_RET(S, ...) U_LOG_CHK_WITH_RET((S)->log_level, __VA_ARGS__)
52#define IPC_CHK_ONLY_PRINT(S, ...) U_LOG_CHK_ONLY_PRINT((S)->log_level, __VA_ARGS__)
53#define IPC_CHK_ALWAYS_RET(S, ...) U_LOG_CHK_ALWAYS_RET((S)->log_level, __VA_ARGS__)
54
55
56/*
57 *
58 * Structs
59 *
60 */
61
62#define IPC_MAX_CLIENT_BODY_TRACKERS 16
63#define IPC_MAX_CLIENT_HAND_TRACKERS 16
64#define IPC_MAX_CLIENT_APP_INSTANCES 4
65#define IPC_MAX_CLIENT_APP_SYSTEMS (IPC_MAX_CLIENT_APP_INSTANCES * 4)
66#define IPC_MAX_CLIENT_SEMAPHORES 8
67#define IPC_MAX_CLIENT_SWAPCHAINS (XRT_MAX_LAYERS * 2)
68#define IPC_MAX_CLIENT_SPACES 128
69#define IPC_MAX_CLIENT_FUTURES 128
70
71struct xrt_instance;
72struct xrt_body_tracker;
73struct xrt_hand_tracker;
74struct xrt_compositor;
76
77
78/*!
79 * Information about a single swapchain.
80 *
81 * @ingroup ipc_server
82 */
84{
85 uint32_t width;
86 uint32_t height;
87 uint64_t format;
88 uint32_t image_count;
89
90 bool active;
91};
92
93
94/*!
95 * Holds the state for a single client.
96 *
97 * @ingroup ipc_server
98 */
100{
101 //! Link back to the main server.
103
104 //! Has the system part of the shm initialized.
106
107 struct
108 {
109 /*!
110 * Array of tracking origins.
111 *
112 * We don't control the lifetime of the tracking origins,
113 * and we only access it from the per client thread,
114 * so we don't need to lock it.
115 */
117
118 /*!
119 * Array of devices.
120 *
121 * We don't control the lifetime of the devices,
122 * and we only access it from the per client thread,
123 * so we don't need to lock it.
124 */
126
127 /*!
128 * Body trackers owned by this client.
129 */
130 struct xrt_body_tracker *xbts[IPC_MAX_CLIENT_BODY_TRACKERS];
131
132 /*!
133 * Hand trackers owned by this client.
134 */
135 struct xrt_hand_tracker *xhts[IPC_MAX_CLIENT_HAND_TRACKERS];
136
137 /*!
138 * Array of app instances owned by this client.
139 */
140 struct xrt_app_instance *xainsts[IPC_MAX_CLIENT_APP_INSTANCES];
141
142 /*!
143 * Array of app systems owned by this client.
144 */
145 struct xrt_app_system *xasys[IPC_MAX_CLIENT_APP_SYSTEMS];
146 } objects;
147
148 //! Session for this client.
150
151 //! Compositor for this client.
153
154 //! Number of swapchains in use by client
156
157 //! Ptrs to the swapchains
158 struct xrt_swapchain *xscs[IPC_MAX_CLIENT_SWAPCHAINS];
159
160 //! Data for the swapchains.
161 struct ipc_swapchain_data swapchain_data[IPC_MAX_CLIENT_SWAPCHAINS];
162
163 //! Number of compositor semaphores in use by client
165
166 //! Ptrs to the semaphores.
167 struct xrt_compositor_semaphore *xcsems[IPC_MAX_CLIENT_SEMAPHORES];
168
169 //! Ptrs to the futures.
170 struct xrt_future *xfts[IPC_MAX_CLIENT_FUTURES];
171
172 struct
173 {
174 uint32_t root;
175 uint32_t local;
176 uint32_t stage;
177 uint32_t unbounded;
178 } semantic_spaces;
179
180 //! Number of spaces.
181 uint32_t space_count;
182 //! Index of localspace in ipc client.
184 //! Index of localspace in space overseer.
186 //! Index of localfloorspace in ipc client.
188 //! Index of localfloorspace in space overseer.
190
191 //! Ptrs to the spaces.
192 struct xrt_space *xspcs[IPC_MAX_CLIENT_SPACES];
193
194 //! Which of the references spaces is the client using.
196
197 //! Which of the device features is the client using.
198 bool device_feature_used[XRT_DEVICE_FEATURE_MAX_ENUM];
199
200 //! Socket fd used for client comms
202
203 struct ipc_app_state client_state;
204
205
206 uint64_t plane_detection_size;
207 uint64_t plane_detection_count;
208
209 //! Array of plane detection ids with plane_detection_size entries.
211
212 //! Array of xrt_devices with plane_detection_size entries.
214
215 int server_thread_index;
216
217 xrt_shmem_handle_t ism_handle;
218};
219
220enum ipc_thread_state
221{
222 IPC_THREAD_READY,
223 IPC_THREAD_STARTING,
224 IPC_THREAD_RUNNING,
225 IPC_THREAD_STOPPING,
226};
227
229{
230 struct os_thread thread;
231 volatile enum ipc_thread_state state;
232 volatile struct ipc_client_state ics;
233};
234
235/*!
236 * Platform-specific mainloop object for the IPC server.
237 *
238 * Contents are essentially implementation details, but are listed in full here so they may be included by value in the
239 * main ipc_server struct.
240 *
241 * @see ipc_design
242 *
243 * @ingroup ipc_server
244 */
246{
247
248#if defined(XRT_OS_ANDROID) || defined(XRT_OS_LINUX) || defined(XRT_DOXYGEN)
249 //! For waiting on various events in the main thread.
251#endif
252
253#if defined(XRT_OS_ANDROID) || defined(XRT_DOXYGEN)
254 /*!
255 * @name Android Mainloop Members
256 * @{
257 */
258
259 //! File descriptor for the read end of our pipe for submitting new clients
261
262 /*!
263 * File descriptor for the write end of our pipe for submitting new clients
264 *
265 * Must hold client_push_mutex while writing.
266 */
268
269 /*!
270 * Mutex for being able to register oneself as a new client.
271 *
272 * Locked only by threads in `ipc_server_mainloop_add_fd()`.
273 *
274 * This must be locked first, and kept locked the entire time a client is attempting to register and wait for
275 * confirmation. It ensures no acknowledgements of acceptance are lost and moves the overhead of ensuring this
276 * to the client thread.
277 */
278 pthread_mutex_t client_push_mutex;
279
280
281 /*!
282 * The last client fd we accepted, to acknowledge client acceptance.
283 *
284 * Also used as a sentinel during shutdown.
285 *
286 * Must hold accept_mutex while writing.
287 */
289
290 /*!
291 * Condition variable for accepting clients.
292 *
293 * Signalled when @ref last_accepted_fd is updated.
294 *
295 * Associated with @ref accept_mutex
296 */
297 pthread_cond_t accept_cond;
298
299 /*!
300 * Mutex for accepting clients.
301 *
302 * Locked by both clients and server: that is, by threads in `ipc_server_mainloop_add_fd()` and in the
303 * server/compositor thread in an implementation function called from `ipc_server_mainloop_poll()`.
304 *
305 * Exists to operate in conjunction with @ref accept_cond - it exists to make sure that the client can be woken
306 * when the server accepts it.
307 */
308 pthread_mutex_t accept_mutex;
309
310
311 /*! @} */
312#define XRT_IPC_GOT_IMPL
313#endif
314
315#if (defined(XRT_OS_LINUX) && !defined(XRT_OS_ANDROID)) || defined(XRT_DOXYGEN)
316 /*!
317 * @name Desktop Linux Mainloop Members
318 * @{
319 */
320
321 //! Socket that we accept connections on.
323
324 //! Were we launched by socket activation, instead of explicitly?
326
327 //! The socket filename we bound to, if any.
329
330 /*! @} */
331
332#define XRT_IPC_GOT_IMPL
333#endif
334
335#if defined(XRT_OS_WINDOWS) || defined(XRT_DOXYGEN)
336 /*!
337 * @name Desktop Windows Mainloop Members
338 * @{
339 */
340
341 //! Named Pipe that we accept connections on.
343
344 //! Name of the Pipe that we accept connections on.
346
347 /*! @} */
348
349#define XRT_IPC_GOT_IMPL
350#endif
351
352#ifndef XRT_IPC_GOT_IMPL
353#error "Need port"
354#endif
355};
356
357/*!
358 * De-initialize the mainloop object.
359 * @public @memberof ipc_server_mainloop
360 */
361void
363
364/*!
365 * Initialize the mainloop object.
366 *
367 * @return <0 on error.
368 * @public @memberof ipc_server_mainloop
369 */
370int
371ipc_server_mainloop_init(struct ipc_server_mainloop *ml, bool no_stdin);
372
373/*!
374 * @brief Poll the mainloop.
375 *
376 * Any errors are signalled by calling ipc_server_handle_failure()
377 * @public @memberof ipc_server_mainloop
378 */
379void
380ipc_server_mainloop_poll(struct ipc_server *vs, struct ipc_server_mainloop *ml);
381
382/*!
383 * Main IPC object for the server.
384 *
385 * @ingroup ipc_server
386 */
388{
389 struct xrt_instance *xinst;
390
391 //! Handle for the current process, e.g. pidfile on linux
393
394 struct u_debug_gui *debug_gui;
395
396 //! The @ref xrt_iface level system.
398
399 //! System devices.
401
402 //! Space overseer.
404
405 //! System compositor.
407
408 struct ipc_shared_memory *isms[IPC_MAX_CLIENTS];
409
410 struct ipc_server_mainloop ml;
411
412 // Is the mainloop supposed to run.
413 volatile bool running;
414
415 // Should we exit when a client disconnects.
416 bool exit_on_disconnect;
417
418 // Should we exit when no clients are connected.
419 bool exit_when_idle;
420
421 // Timestamp when last client disconnected (for exit_when_idle delay)
422 uint64_t last_client_disconnect_ns;
423
424 // How long to wait after all clients disconnect before exiting (in nanoseconds)
425 uint64_t exit_when_idle_delay_ns;
426
427 /*!
428 * Global start of time timestamp. XrTime that is returned to apps
429 * start from this timestamps (with an per app offset applied). In order
430 * to ensure that all timestamps for events and other data that is
431 * tracked by the runtime within the valid range of XrTime it is offset
432 * to be 42 minutes in the past from start of the runtime.
433 *
434 * Used to get all the client's xrt_instance::startup_timestamp, to be
435 * close to each other but not exactly the same, which is then used to
436 * be the base of that app's XrTime start of time.
437 */
439
440 enum u_logging_level log_level;
441
442 struct ipc_thread threads[IPC_MAX_CLIENTS];
443
444 volatile uint32_t current_slot_index;
445
446 //! Generator for IDs.
447 uint32_t id_generator;
448
449 struct
450 {
451 int active_client_index;
452 int last_active_client_index;
453
454 // Counter for total number of connected clients
455 uint32_t connected_client_count;
456
457 struct os_mutex lock;
458 } global_state;
459
460 /*!
461 * Callbacks for server events.
462 */
464
465 /*!
466 * User data passed to callbacks.
467 */
469
470 //! Disable listening on stdin for server stop.
472};
473
474/*!
475 * Finish setting up the server by creating the system, compositor and devices.
476 *
477 * @ingroup ipc_server
478 */
481 volatile struct ipc_client_state *ics,
482 bool *out_available);
483
484/*!
485 * Get the current state of a client.
486 *
487 * @ingroup ipc_server
488 */
490ipc_server_get_client_app_state(struct ipc_server *s, uint32_t client_id, struct ipc_app_state *out_ias);
491
492/*!
493 * Set the new active client.
494 *
495 * @ingroup ipc_server
496 */
498ipc_server_set_active_client(struct ipc_server *s, uint32_t client_id);
499
500/*!
501 * Toggle the io for this client.
502 *
503 * @ingroup ipc_server
504 */
506ipc_server_toggle_io_client(struct ipc_server *s, uint32_t client_id);
507
508/*!
509 * Block certain types of IO for this client.
510 *
511 * @ingroup ipc_server
512 */
514ipc_server_set_client_io_blocks(struct ipc_server *s, uint32_t client_id, const struct ipc_client_io_blocks *blocks);
515
516/*!
517 * Called by client threads to set a session to active.
518 *
519 * @ingroup ipc_server
520 */
521void
523
524/*!
525 * Called by client threads to set a session to deactivate.
526 *
527 * @ingroup ipc_server
528 */
529void
531
532/*!
533 * Called by client threads to recalculate active client.
534 *
535 * @ingroup ipc_server
536 */
537void
539
540/*!
541 * Thread function for the client side dispatching.
542 *
543 * @ingroup ipc_server
544 */
545void *
546ipc_server_client_thread(void *_ics);
547
548/*!
549 * This destroys the native compositor for this client and any extra objects
550 * created from it, like all of the swapchains.
551 */
552void
554
555/*!
556 * @defgroup ipc_server_internals Server Internals
557 * @brief These are only called by the platform-specific mainloop polling code.
558 * @ingroup ipc_server
559 * @{
560 */
561/*!
562 * Called when a client has connected, it takes the client's ipc handle.
563 * Handles all things needed to be done for a client connecting, like starting
564 * it's thread.
565 *
566 * @param vs The IPC server.
567 * @param ipc_handle Handle to communicate over.
568 * @memberof ipc_server
569 */
570void
571ipc_server_handle_client_connected(struct ipc_server *vs, xrt_ipc_handle_t ipc_handle);
572
573/*!
574 * Perform whatever needs to be done when the mainloop polling encounters a failure.
575 * @memberof ipc_server
576 */
577void
578ipc_server_handle_failure(struct ipc_server *vs);
579
580/*!
581 * Perform whatever needs to be done when the mainloop polling identifies that the server should be shut down.
582 *
583 * Does something like setting a flag or otherwise signalling for shutdown: does not itself explicitly exit.
584 * @memberof ipc_server
585 */
586void
587ipc_server_handle_shutdown_signal(struct ipc_server *vs);
588
590ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_properties *out_properties);
591//! @}
592
593/*
594 *
595 * Helpers
596 *
597 */
598
599/*!
600 * Get the data in the shared memory of the given client.
601 */
602static inline struct ipc_shared_memory *
603get_ism(volatile struct ipc_client_state *ics)
604{
605 return ics->server->isms[ics->server_thread_index];
606}
607
608/*!
609 * Get the handle for the shared memory of the given client.
610 */
611static inline xrt_shmem_handle_t
612get_ism_handle(volatile struct ipc_client_state *ics)
613{
614 return ics->ism_handle;
615}
616
617#ifdef __cplusplus
618}
619#endif
Generic typedef for platform-specific shared memory handle.
u_logging_level
Logging level enum.
Definition u_logging.h:45
xrt_result_t ipc_server_set_client_io_blocks(struct ipc_server *s, uint32_t client_id, const struct ipc_client_io_blocks *blocks)
Block certain types of IO for this client.
Definition ipc_server_process.c:864
xrt_result_t ipc_server_get_client_app_state(struct ipc_server *s, uint32_t client_id, struct ipc_app_state *out_ias)
Get the current state of a client.
Definition ipc_server_process.c:834
void ipc_server_deactivate_session(volatile struct ipc_client_state *ics)
Called by client threads to set a session to deactivate.
Definition ipc_server_process.c:905
void ipc_server_activate_session(volatile struct ipc_client_state *ics)
Called by client threads to set a session to active.
Definition ipc_server_process.c:874
void * ipc_server_client_thread(void *_ics)
Thread function for the client side dispatching.
Definition ipc_server_per_client_thread.c:484
void ipc_server_update_state(struct ipc_server *s)
Called by client threads to recalculate active client.
Definition ipc_server_process.c:920
xrt_result_t ipc_server_set_active_client(struct ipc_server *s, uint32_t client_id)
Set the new active client.
Definition ipc_server_process.c:844
xrt_result_t ipc_server_toggle_io_client(struct ipc_server *s, uint32_t client_id)
Toggle the io for this client.
Definition ipc_server_process.c:854
xrt_result_t ipc_server_init_system_if_available_locked(struct ipc_server *s, volatile struct ipc_client_state *ics, bool *out_available)
Finish setting up the server by creating the system, compositor and devices.
Definition ipc_server_process.c:798
#define XRT_SYSTEM_MAX_DEVICES
Maximum number of devices simultaneously usable by an implementation of xrt_system_devices.
Definition xrt_limits.h:26
#define XRT_SPACE_REFERENCE_TYPE_COUNT
The number of enumerations in xrt_reference_space_type.
Definition xrt_defines.h:659
enum xrt_result xrt_result_t
Result type used across Monado.
IPC message channel functions.
Common protocol definition.
void ipc_server_client_destroy_session_and_compositor(volatile struct ipc_client_state *ics)
This destroys the native compositor for this client and any extra objects created from it,...
Definition ipc_server_per_client_thread.c:447
static struct ipc_shared_memory * get_ism(volatile struct ipc_client_state *ics)
Get the data in the shared memory of the given client.
Definition ipc_server.h:603
static xrt_shmem_handle_t get_ism_handle(volatile struct ipc_client_state *ics)
Get the handle for the shared memory of the given client.
Definition ipc_server.h:612
Interface for IPC server code.
void ipc_server_mainloop_deinit(struct ipc_server_mainloop *ml)
Definition ipc_server_mainloop_android.c:160
Wrapper around OS threading native functions.
State for a connected application.
Definition ipc_protocol.h:388
Which types of IO to block for a client.
Definition ipc_protocol.h:375
Holds the state for a single client.
Definition ipc_server.h:100
uint32_t swapchain_count
Number of swapchains in use by client.
Definition ipc_server.h:155
struct xrt_app_instance * xainsts[4]
Array of app instances owned by this client.
Definition ipc_server.h:140
struct xrt_swapchain * xscs[(XRT_MAX_LAYERS *2)]
Ptrs to the swapchains.
Definition ipc_server.h:158
struct xrt_session * xs
Session for this client.
Definition ipc_server.h:149
struct ipc_message_channel imc
Socket fd used for client comms.
Definition ipc_server.h:201
bool has_init_shm_system
Has the system part of the shm initialized.
Definition ipc_server.h:105
struct xrt_device ** plane_detection_xdev
Array of xrt_devices with plane_detection_size entries.
Definition ipc_server.h:213
struct ipc_server * server
Link back to the main server.
Definition ipc_server.h:102
uint32_t local_floor_space_index
Index of localfloorspace in ipc client.
Definition ipc_server.h:187
struct xrt_body_tracker * xbts[16]
Body trackers owned by this client.
Definition ipc_server.h:130
struct ipc_swapchain_data swapchain_data[(XRT_MAX_LAYERS *2)]
Data for the swapchains.
Definition ipc_server.h:161
uint32_t compositor_semaphore_count
Number of compositor semaphores in use by client.
Definition ipc_server.h:164
struct xrt_tracking_origin * xtracks[XRT_SYSTEM_MAX_DEVICES]
Array of tracking origins.
Definition ipc_server.h:116
uint32_t local_space_overseer_index
Index of localspace in space overseer.
Definition ipc_server.h:185
struct xrt_space * xspcs[128]
Ptrs to the spaces.
Definition ipc_server.h:192
uint32_t local_space_index
Index of localspace in ipc client.
Definition ipc_server.h:183
struct xrt_app_system * xasys[(4 *4)]
Array of app systems owned by this client.
Definition ipc_server.h:145
bool ref_space_used[XRT_SPACE_REFERENCE_TYPE_COUNT]
Which of the references spaces is the client using.
Definition ipc_server.h:195
struct xrt_compositor_semaphore * xcsems[8]
Ptrs to the semaphores.
Definition ipc_server.h:167
uint32_t space_count
Number of spaces.
Definition ipc_server.h:181
bool device_feature_used[XRT_DEVICE_FEATURE_MAX_ENUM]
Which of the device features is the client using.
Definition ipc_server.h:198
uint64_t * plane_detection_ids
Array of plane detection ids with plane_detection_size entries.
Definition ipc_server.h:210
uint32_t local_floor_space_overseer_index
Index of localfloorspace in space overseer.
Definition ipc_server.h:189
struct xrt_device * xdevs[XRT_SYSTEM_MAX_DEVICES]
Array of devices.
Definition ipc_server.h:125
struct xrt_compositor * xc
Compositor for this client.
Definition ipc_server.h:152
struct xrt_hand_tracker * xhts[16]
Hand trackers owned by this client.
Definition ipc_server.h:135
struct xrt_future * xfts[128]
Ptrs to the futures.
Definition ipc_server.h:170
Wrapper for a socket and flags.
Definition ipc_message_channel.h:30
Definition ipc_server_interface.h:52
Platform-specific mainloop object for the IPC server.
Definition ipc_server.h:246
bool launched_by_socket
Were we launched by socket activation, instead of explicitly?
Definition ipc_server.h:325
pthread_cond_t accept_cond
Condition variable for accepting clients.
Definition ipc_server.h:297
char * pipe_name
Name of the Pipe that we accept connections on.
Definition ipc_server.h:345
int last_accepted_fd
The last client fd we accepted, to acknowledge client acceptance.
Definition ipc_server.h:288
int epoll_fd
For waiting on various events in the main thread.
Definition ipc_server.h:250
pthread_mutex_t accept_mutex
Mutex for accepting clients.
Definition ipc_server.h:308
int pipe_read
File descriptor for the read end of our pipe for submitting new clients.
Definition ipc_server.h:260
int listen_socket
Socket that we accept connections on.
Definition ipc_server.h:322
int pipe_write
File descriptor for the write end of our pipe for submitting new clients.
Definition ipc_server.h:267
char * socket_filename
The socket filename we bound to, if any.
Definition ipc_server.h:328
pthread_mutex_t client_push_mutex
Mutex for being able to register oneself as a new client.
Definition ipc_server.h:278
HANDLE pipe_handle
Named Pipe that we accept connections on.
Definition ipc_server.h:342
Main IPC object for the server.
Definition ipc_server.h:388
void * callback_data
User data passed to callbacks.
Definition ipc_server.h:468
struct u_process * process
Handle for the current process, e.g. pidfile on linux.
Definition ipc_server.h:392
const struct ipc_server_callbacks * callbacks
Callbacks for server events.
Definition ipc_server.h:463
struct xrt_system_compositor * xsysc
System compositor.
Definition ipc_server.h:406
struct xrt_space_overseer * xso
Space overseer.
Definition ipc_server.h:403
uint32_t id_generator
Generator for IDs.
Definition ipc_server.h:447
struct xrt_system * xsys
The XRT interfaces level system.
Definition ipc_server.h:397
struct xrt_system_devices * xsysd
System devices.
Definition ipc_server.h:400
int64_t start_of_time_timestamp_ns
Global start of time timestamp.
Definition ipc_server.h:438
bool no_stdin
Disable listening on stdin for server stop.
Definition ipc_server.h:471
A big struct that contains all data that is shared to a client, no pointers allowed in this.
Definition ipc_protocol.h:266
Information about a single swapchain.
Definition ipc_server.h:84
Definition ipc_server.h:229
A wrapper around a native mutex.
Definition os_threading.h:69
A wrapper around a native thread.
Definition os_threading.h:298
Definition u_worker.c:38
Definition u_process.c:43
This interface acts as a way to store per-application policy for xrt_instance.
Definition xrt_app_policy.h:34
This interface acts as a way to store per-application policy for xrt_system.
Definition xrt_app_policy.h:120
A body tracker, owns the policy for selecting which device and body-tracking source back a single Ope...
Definition xrt_body_tracker.h:102
Main compositor server interface.
Definition xrt_compositor.h:2218
Compositor semaphore used for synchronization, needs to be as capable as a Vulkan pipeline semaphore.
Definition xrt_compositor.h:845
Common compositor client interface/base.
Definition xrt_compositor.h:1046
A single HMD or input device.
Definition xrt_device.h:357
A future is a concurrency primitive that provides a mechanism to access results of asynchronous opera...
Definition xrt_future.h:75
A hand tracker that owns device/source selection policy.
Definition xrt_hand_tracker.h:76
This interface acts as a root object for Monado.
Definition xrt_instance.h:122
The XRT representation of XrSession, this object does not have all of the functionality of a session,...
Definition xrt_session.h:264
Object that oversees and manages spaces, one created for each XR system.
Definition xrt_space.h:97
A space very similar to a OpenXR XrSpace but not a full one-to-one mapping, but used to power XrSpace...
Definition xrt_space.h:32
Common swapchain interface/base.
Definition xrt_compositor.h:593
The system compositor handles composition for a system.
Definition xrt_compositor.h:2459
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
Definition xrt_system.h:216
Properties provided by the system.
Definition xrt_system.h:46
A system is a collection of devices, policies and optionally a compositor that is organised into a ch...
Definition xrt_system.h:65
A tracking system or device origin.
Definition xrt_tracking.h:83
Hashmap for integer values header.
Basic logging functionality.
Header holding common defines.
int xrt_ipc_handle_t
The type for an IPC handle.
Definition xrt_handles.h:75
Header for limits of the XRT interfaces.
Header defining xrt space and space overseer.
Header for system objects.