The open source OpenXR runtime
at main 710 B view raw
1// Copyright 2022, Magic Leap, Inc. 2// Copyright 2020-2023, Collabora, Ltd. 3// SPDX-License-Identifier: BSL-1.0 4/*! 5 * @file 6 * @brief IPC util helpers. 7 * @author Julian Petrov <jpetrov@magicleap.com> 8 * @author Jakob Bornecrantz <jakob@collabora.com> 9 * @ingroup ipc_shared 10 */ 11 12#include "ipc_utils.h" 13 14#ifdef XRT_OS_WINDOWS 15#include "util/u_windows.h" 16#endif 17 18 19/* 20 * 21 * Misc utils 'exported' functions. 22 * 23 */ 24 25#ifdef XRT_OS_WINDOWS 26const char * 27ipc_winerror(DWORD err) 28{ 29 static char s_buf[4096]; // N.B. Not thread-safe. If needed, use a thread var 30 return u_winerror(s_buf, sizeof(s_buf), err, false); 31} 32#else 33void 34_a_function_to_not_create_an_empty_compile_unit(void) 35{ 36 // To avoid warnings. 37} 38#endif