Monado OpenXR Runtime

Shared IPC code. More...

Collaboration diagram for Shared IPC code:

Files

file  ipc_message_channel.h
 IPC message channel functions.
 
file  ipc_message_channel_unix.c
 IPC message channel functions for UNIX platforms.
 
file  ipc_message_channel_windows.cpp
 IPC message channel functions for Windows.
 
file  ipc_protocol.h
 Common protocol definition.
 
file  ipc_shmem.c
 IPC shared memory helpers.
 
file  ipc_shmem.h
 Shared memory helpers.
 
file  ipc_utils.c
 IPC util helpers.
 
file  ipc_utils.h
 IPC util helpers, for internal use only.
 

Functions

void ipc_print_result (enum u_logging_level cond_level, const char *file, int line, const char *calling_func, xrt_result_t xret, const char *called_func)
 Helper to print the results of called functions that return xret results, if the result is XRT_SUCCESS will log with info, otherwise error. More...
 
const char * ipc_winerror (DWORD err)
 Helper to convert windows error codes to human readable strings for logging. More...
 

Detailed Description

Shared IPC code.

Function Documentation

◆ ipc_print_result()

void ipc_print_result ( enum u_logging_level  cond_level,
const char *  file,
int  line,
const char *  calling_func,
xrt_result_t  xret,
const char *  called_func 
)

#include <ipc/shared/ipc_utils.h>

Helper to print the results of called functions that return xret results, if the result is XRT_SUCCESS will log with info, otherwise error.

Will also check if logging should be done with cond_level.

Parameters
cond_levelWhat the current logging level is.
fileCallee site (FILE).
lineCallee site (LINE).
calling_fnCallee site (func).
xretResult from the called function.
called_fnWhich function that this return is from.

References U_LOGGING_ERROR, U_LOGGING_INFO, and XRT_SUCCESS.

◆ ipc_winerror()

const char * ipc_winerror ( DWORD  err)

#include <ipc/shared/ipc_utils.h>

Helper to convert windows error codes to human readable strings for logging.

N.B. This routine is not thread safe.

Parameters
errwindows error code
Returns
human readable string corresponding to the error code.