Monado OpenXR Runtime
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_SEMAPHORES 8
63#define IPC_MAX_CLIENT_SWAPCHAINS (XRT_MAX_LAYERS * 2)
64#define IPC_MAX_CLIENT_SPACES 128
65#define IPC_MAX_CLIENT_FUTURES 128
66
67struct xrt_instance;
68struct xrt_compositor;
70
71
72/*!
73 * Information about a single swapchain.
74 *
75 * @ingroup ipc_server
76 */
78{
79 uint32_t width;
80 uint32_t height;
81 uint64_t format;
82 uint32_t image_count;
83
84 bool active;
85};
86
87
88/*!
89 * Holds the state for a single client.
90 *
91 * @ingroup ipc_server
92 */
94{
95 //! Link back to the main server.
97
98 //! Has the system part of the shm initialized.
100
101 struct
102 {
103 /*!
104 * Array of tracking origins.
105 *
106 * We don't control the lifetime of the tracking origins,
107 * and we only access it from the per client thread,
108 * so we don't need to lock it.
109 */
111
112 /*!
113 * Array of devices.
114 *
115 * We don't control the lifetime of the devices,
116 * and we only access it from the per client thread,
117 * so we don't need to lock it.
118 */
120 } objects;
121
122 //! Session for this client.
124
125 //! Compositor for this client.
127
128 //! Is the inputs and outputs active.
130
131 //! Number of swapchains in use by client
133
134 //! Ptrs to the swapchains
135 struct xrt_swapchain *xscs[IPC_MAX_CLIENT_SWAPCHAINS];
136
137 //! Data for the swapchains.
138 struct ipc_swapchain_data swapchain_data[IPC_MAX_CLIENT_SWAPCHAINS];
139
140 //! Number of compositor semaphores in use by client
142
143 //! Ptrs to the semaphores.
144 struct xrt_compositor_semaphore *xcsems[IPC_MAX_CLIENT_SEMAPHORES];
145
146 //! Ptrs to the futures.
147 struct xrt_future *xfts[IPC_MAX_CLIENT_FUTURES];
148
149 struct
150 {
151 uint32_t root;
152 uint32_t local;
153 uint32_t stage;
154 uint32_t unbounded;
155 } semantic_spaces;
156
157 //! Number of spaces.
158 uint32_t space_count;
159 //! Index of localspace in ipc client.
161 //! Index of localspace in space overseer.
163 //! Index of localfloorspace in ipc client.
165 //! Index of localfloorspace in space overseer.
167
168 //! Ptrs to the spaces.
169 struct xrt_space *xspcs[IPC_MAX_CLIENT_SPACES];
170
171 //! Which of the references spaces is the client using.
173
174 //! Which of the device features is the client using.
175 bool device_feature_used[XRT_DEVICE_FEATURE_MAX_ENUM];
176
177 //! Socket fd used for client comms
179
180 struct ipc_app_state client_state;
181
182
183 uint64_t plane_detection_size;
184 uint64_t plane_detection_count;
185
186 //! Array of plane detection ids with plane_detection_size entries.
188
189 //! Array of xrt_devices with plane_detection_size entries.
191
192 int server_thread_index;
193
194 xrt_shmem_handle_t ism_handle;
195};
196
197enum ipc_thread_state
198{
199 IPC_THREAD_READY,
200 IPC_THREAD_STARTING,
201 IPC_THREAD_RUNNING,
202 IPC_THREAD_STOPPING,
203};
204
206{
207 struct os_thread thread;
208 volatile enum ipc_thread_state state;
209 volatile struct ipc_client_state ics;
210};
211
212/*!
213 * Platform-specific mainloop object for the IPC server.
214 *
215 * Contents are essentially implementation details, but are listed in full here so they may be included by value in the
216 * main ipc_server struct.
217 *
218 * @see ipc_design
219 *
220 * @ingroup ipc_server
221 */
223{
224
225#if defined(XRT_OS_ANDROID) || defined(XRT_OS_LINUX) || defined(XRT_DOXYGEN)
226 //! For waiting on various events in the main thread.
228#endif
229
230#if defined(XRT_OS_ANDROID) || defined(XRT_DOXYGEN)
231 /*!
232 * @name Android Mainloop Members
233 * @{
234 */
235
236 //! File descriptor for the read end of our pipe for submitting new clients
238
239 /*!
240 * File descriptor for the write end of our pipe for submitting new clients
241 *
242 * Must hold client_push_mutex while writing.
243 */
245
246 /*!
247 * Mutex for being able to register oneself as a new client.
248 *
249 * Locked only by threads in `ipc_server_mainloop_add_fd()`.
250 *
251 * This must be locked first, and kept locked the entire time a client is attempting to register and wait for
252 * confirmation. It ensures no acknowledgements of acceptance are lost and moves the overhead of ensuring this
253 * to the client thread.
254 */
255 pthread_mutex_t client_push_mutex;
256
257
258 /*!
259 * The last client fd we accepted, to acknowledge client acceptance.
260 *
261 * Also used as a sentinel during shutdown.
262 *
263 * Must hold accept_mutex while writing.
264 */
266
267 /*!
268 * Condition variable for accepting clients.
269 *
270 * Signalled when @ref last_accepted_fd is updated.
271 *
272 * Associated with @ref accept_mutex
273 */
274 pthread_cond_t accept_cond;
275
276 /*!
277 * Mutex for accepting clients.
278 *
279 * Locked by both clients and server: that is, by threads in `ipc_server_mainloop_add_fd()` and in the
280 * server/compositor thread in an implementation function called from `ipc_server_mainloop_poll()`.
281 *
282 * Exists to operate in conjunction with @ref accept_cond - it exists to make sure that the client can be woken
283 * when the server accepts it.
284 */
285 pthread_mutex_t accept_mutex;
286
287
288 /*! @} */
289#define XRT_IPC_GOT_IMPL
290#endif
291
292#if (defined(XRT_OS_LINUX) && !defined(XRT_OS_ANDROID)) || defined(XRT_DOXYGEN)
293 /*!
294 * @name Desktop Linux Mainloop Members
295 * @{
296 */
297
298 //! Socket that we accept connections on.
300
301 //! Were we launched by socket activation, instead of explicitly?
303
304 //! The socket filename we bound to, if any.
306
307 /*! @} */
308
309#define XRT_IPC_GOT_IMPL
310#endif
311
312#if defined(XRT_OS_WINDOWS) || defined(XRT_DOXYGEN)
313 /*!
314 * @name Desktop Windows Mainloop Members
315 * @{
316 */
317
318 //! Named Pipe that we accept connections on.
320
321 //! Name of the Pipe that we accept connections on.
323
324 /*! @} */
325
326#define XRT_IPC_GOT_IMPL
327#endif
328
329#ifndef XRT_IPC_GOT_IMPL
330#error "Need port"
331#endif
332};
333
334/*!
335 * De-initialize the mainloop object.
336 * @public @memberof ipc_server_mainloop
337 */
338void
340
341/*!
342 * Initialize the mainloop object.
343 *
344 * @return <0 on error.
345 * @public @memberof ipc_server_mainloop
346 */
347int
348ipc_server_mainloop_init(struct ipc_server_mainloop *ml, bool no_stdin);
349
350/*!
351 * @brief Poll the mainloop.
352 *
353 * Any errors are signalled by calling ipc_server_handle_failure()
354 * @public @memberof ipc_server_mainloop
355 */
356void
358
359/*!
360 * Main IPC object for the server.
361 *
362 * @ingroup ipc_server
363 */
365{
366 struct xrt_instance *xinst;
367
368 //! Handle for the current process, e.g. pidfile on linux
370
371 struct u_debug_gui *debug_gui;
372
373 //! The @ref xrt_iface level system.
375
376 //! System devices.
378
379 //! Space overseer.
381
382 //! System compositor.
384
385 struct ipc_shared_memory *isms[IPC_MAX_CLIENTS];
386
387 struct ipc_server_mainloop ml;
388
389 // Is the mainloop supposed to run.
390 volatile bool running;
391
392 // Should we exit when a client disconnects.
393 bool exit_on_disconnect;
394
395 // Should we exit when no clients are connected.
396 bool exit_when_idle;
397
398 // Timestamp when last client disconnected (for exit_when_idle delay)
399 uint64_t last_client_disconnect_ns;
400
401 // How long to wait after all clients disconnect before exiting (in nanoseconds)
402 uint64_t exit_when_idle_delay_ns;
403
404 enum u_logging_level log_level;
405
406 struct ipc_thread threads[IPC_MAX_CLIENTS];
407
408 volatile uint32_t current_slot_index;
409
410 //! Generator for IDs.
411 uint32_t id_generator;
412
413 struct
414 {
415 int active_client_index;
416 int last_active_client_index;
417
418 // Counter for total number of connected clients
419 uint32_t connected_client_count;
420
421 struct os_mutex lock;
422 } global_state;
423
424 /*!
425 * Callbacks for server events.
426 */
428
429 /*!
430 * User data passed to callbacks.
431 */
433
434 //! Disable listening on stdin for server stop.
436};
437
438/*!
439 * Finish setting up the server by creating the system, compositor and devices.
440 *
441 * @ingroup ipc_server
442 */
445 volatile struct ipc_client_state *ics,
446 bool *out_available);
447
448/*!
449 * Get the current state of a client.
450 *
451 * @ingroup ipc_server
452 */
454ipc_server_get_client_app_state(struct ipc_server *s, uint32_t client_id, struct ipc_app_state *out_ias);
455
456/*!
457 * Set the new active client.
458 *
459 * @ingroup ipc_server
460 */
462ipc_server_set_active_client(struct ipc_server *s, uint32_t client_id);
463
464/*!
465 * Toggle the io for this client.
466 *
467 * @ingroup ipc_server
468 */
470ipc_server_toggle_io_client(struct ipc_server *s, uint32_t client_id);
471
472/*!
473 * Called by client threads to set a session to active.
474 *
475 * @ingroup ipc_server
476 */
477void
479
480/*!
481 * Called by client threads to set a session to deactivate.
482 *
483 * @ingroup ipc_server
484 */
485void
487
488/*!
489 * Called by client threads to recalculate active client.
490 *
491 * @ingroup ipc_server
492 */
493void
495
496/*!
497 * Thread function for the client side dispatching.
498 *
499 * @ingroup ipc_server
500 */
501void *
502ipc_server_client_thread(void *_ics);
503
504/*!
505 * This destroys the native compositor for this client and any extra objects
506 * created from it, like all of the swapchains.
507 */
508void
510
511/*!
512 * @defgroup ipc_server_internals Server Internals
513 * @brief These are only called by the platform-specific mainloop polling code.
514 * @ingroup ipc_server
515 * @{
516 */
517/*!
518 * Called when a client has connected, it takes the client's ipc handle.
519 * Handles all things needed to be done for a client connecting, like starting
520 * it's thread.
521 *
522 * @param vs The IPC server.
523 * @param ipc_handle Handle to communicate over.
524 * @memberof ipc_server
525 */
526void
528
529/*!
530 * Perform whatever needs to be done when the mainloop polling encounters a failure.
531 * @memberof ipc_server
532 */
533void
535
536/*!
537 * Perform whatever needs to be done when the mainloop polling identifies that the server should be shut down.
538 *
539 * Does something like setting a flag or otherwise signalling for shutdown: does not itself explicitly exit.
540 * @memberof ipc_server
541 */
542void
544
546ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_properties *out_properties);
547//! @}
548
549/*
550 *
551 * Helpers
552 *
553 */
554
555/*!
556 * Get the data in the shared memory of the given client.
557 */
558static inline struct ipc_shared_memory *
559get_ism(volatile struct ipc_client_state *ics)
560{
561 return ics->server->isms[ics->server_thread_index];
562}
563
564/*!
565 * Get the handle for the shared memory of the given client.
566 */
567static inline xrt_shmem_handle_t
568get_ism_handle(volatile struct ipc_client_state *ics)
569{
570 return ics->ism_handle;
571}
572
573#ifdef __cplusplus
574}
575#endif
Generic typedef for platform-specific shared memory handle.
u_logging_level
Logging level enum.
Definition: u_logging.h:45
void ipc_server_handle_client_connected(struct ipc_server *vs, xrt_ipc_handle_t ipc_handle)
Called when a client has connected, it takes the client's ipc handle.
Definition: ipc_server_process.c:787
void ipc_server_handle_shutdown_signal(struct ipc_server *vs)
Perform whatever needs to be done when the mainloop polling identifies that the server should be shut...
Definition: ipc_server_process.c:781
void ipc_server_handle_failure(struct ipc_server *vs)
Perform whatever needs to be done when the mainloop polling encounters a failure.
Definition: ipc_server_process.c:774
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:684
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:748
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:714
void * ipc_server_client_thread(void *_ics)
Thread function for the client side dispatching.
Definition: ipc_server_per_client_thread.c:443
void ipc_server_update_state(struct ipc_server *s)
Called by client threads to recalculate active client.
Definition: ipc_server_process.c:763
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:694
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:704
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:648
#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:625
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:406
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:559
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:568
Interface for IPC server code.
Wrapper around OS threading native functions.
State for a connected application.
Definition: ipc_protocol.h:336
Holds the state for a single client.
Definition: ipc_server.h:94
uint32_t swapchain_count
Number of swapchains in use by client.
Definition: ipc_server.h:132
struct xrt_swapchain * xscs[(XRT_MAX_LAYERS *2)]
Ptrs to the swapchains.
Definition: ipc_server.h:135
struct xrt_session * xs
Session for this client.
Definition: ipc_server.h:123
struct ipc_message_channel imc
Socket fd used for client comms.
Definition: ipc_server.h:178
bool has_init_shm_system
Has the system part of the shm initialized.
Definition: ipc_server.h:99
struct xrt_device ** plane_detection_xdev
Array of xrt_devices with plane_detection_size entries.
Definition: ipc_server.h:190
struct ipc_server * server
Link back to the main server.
Definition: ipc_server.h:96
uint32_t local_floor_space_index
Index of localfloorspace in ipc client.
Definition: ipc_server.h:164
struct ipc_swapchain_data swapchain_data[(XRT_MAX_LAYERS *2)]
Data for the swapchains.
Definition: ipc_server.h:138
uint32_t compositor_semaphore_count
Number of compositor semaphores in use by client.
Definition: ipc_server.h:141
struct xrt_tracking_origin * xtracks[XRT_SYSTEM_MAX_DEVICES]
Array of tracking origins.
Definition: ipc_server.h:110
uint32_t local_space_overseer_index
Index of localspace in space overseer.
Definition: ipc_server.h:162
struct xrt_space * xspcs[128]
Ptrs to the spaces.
Definition: ipc_server.h:169
uint32_t local_space_index
Index of localspace in ipc client.
Definition: ipc_server.h:160
bool ref_space_used[XRT_SPACE_REFERENCE_TYPE_COUNT]
Which of the references spaces is the client using.
Definition: ipc_server.h:172
struct xrt_compositor_semaphore * xcsems[8]
Ptrs to the semaphores.
Definition: ipc_server.h:144
uint32_t space_count
Number of spaces.
Definition: ipc_server.h:158
bool device_feature_used[XRT_DEVICE_FEATURE_MAX_ENUM]
Which of the device features is the client using.
Definition: ipc_server.h:175
bool io_active
Is the inputs and outputs active.
Definition: ipc_server.h:129
uint64_t * plane_detection_ids
Array of plane detection ids with plane_detection_size entries.
Definition: ipc_server.h:187
uint32_t local_floor_space_overseer_index
Index of localfloorspace in space overseer.
Definition: ipc_server.h:166
struct xrt_device * xdevs[XRT_SYSTEM_MAX_DEVICES]
Array of devices.
Definition: ipc_server.h:119
struct xrt_compositor * xc
Compositor for this client.
Definition: ipc_server.h:126
struct xrt_future * xfts[128]
Ptrs to the futures.
Definition: ipc_server.h:147
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:223
int ipc_server_mainloop_init(struct ipc_server_mainloop *ml, bool no_stdin)
Initialize the mainloop object.
Definition: ipc_server_mainloop_android.c:142
bool launched_by_socket
Were we launched by socket activation, instead of explicitly?
Definition: ipc_server.h:302
pthread_cond_t accept_cond
Condition variable for accepting clients.
Definition: ipc_server.h:274
char * pipe_name
Name of the Pipe that we accept connections on.
Definition: ipc_server.h:322
int last_accepted_fd
The last client fd we accepted, to acknowledge client acceptance.
Definition: ipc_server.h:265
int epoll_fd
For waiting on various events in the main thread.
Definition: ipc_server.h:227
void ipc_server_mainloop_deinit(struct ipc_server_mainloop *ml)
De-initialize the mainloop object.
Definition: ipc_server_mainloop_android.c:160
pthread_mutex_t accept_mutex
Mutex for accepting clients.
Definition: ipc_server.h:285
int pipe_read
File descriptor for the read end of our pipe for submitting new clients.
Definition: ipc_server.h:237
int listen_socket
Socket that we accept connections on.
Definition: ipc_server.h:299
int pipe_write
File descriptor for the write end of our pipe for submitting new clients.
Definition: ipc_server.h:244
char * socket_filename
The socket filename we bound to, if any.
Definition: ipc_server.h:305
pthread_mutex_t client_push_mutex
Mutex for being able to register oneself as a new client.
Definition: ipc_server.h:255
void ipc_server_mainloop_poll(struct ipc_server *vs, struct ipc_server_mainloop *ml)
Poll the mainloop.
Definition: ipc_server_mainloop_android.c:119
HANDLE pipe_handle
Named Pipe that we accept connections on.
Definition: ipc_server.h:319
Main IPC object for the server.
Definition: ipc_server.h:365
void * callback_data
User data passed to callbacks.
Definition: ipc_server.h:432
struct u_process * process
Handle for the current process, e.g. pidfile on linux.
Definition: ipc_server.h:369
const struct ipc_server_callbacks * callbacks
Callbacks for server events.
Definition: ipc_server.h:427
struct xrt_system_compositor * xsysc
System compositor.
Definition: ipc_server.h:383
struct xrt_space_overseer * xso
Space overseer.
Definition: ipc_server.h:380
uint32_t id_generator
Generator for IDs.
Definition: ipc_server.h:411
struct xrt_system * xsys
The XRT interfaces level system.
Definition: ipc_server.h:374
struct xrt_system_devices * xsysd
System devices.
Definition: ipc_server.h:377
bool no_stdin
Disable listening on stdin for server stop.
Definition: ipc_server.h:435
A big struct that contains all data that is shared to a client, no pointers allowed in this.
Definition: ipc_protocol.h:249
Information about a single swapchain.
Definition: ipc_server.h:78
Definition: ipc_server.h:206
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
Main compositor server interface.
Definition: xrt_compositor.h:2236
Compositor semaphore used for synchronization, needs to be as capable as a Vulkan pipeline semaphore.
Definition: xrt_compositor.h:792
Common compositor client interface/base.
Definition: xrt_compositor.h:992
A single HMD or input device.
Definition: xrt_device.h:310
A future is a concurrency primitive that provides a mechanism to access results of asynchronous opera...
Definition: xrt_future.h:75
This interface acts as a root object for Monado.
Definition: xrt_instance.h:120
The XRT representation of XrSession, this object does not have all of the functionality of a session,...
Definition: xrt_session.h:277
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:540
The system compositor handles composition for a system.
Definition: xrt_compositor.h:2448
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
Definition: xrt_system.h:214
Properties provided by the system.
Definition: xrt_system.h:44
A system is a collection of devices, policies and optionally a compositor that is organised into a ch...
Definition: xrt_system.h:63
A tracking system or device origin.
Definition: xrt_tracking.h:75
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.