···3636#define IPC_WARN(IPC_C, ...) U_LOG_IFL_W((IPC_C)->imc.log_level, __VA_ARGS__)
3737#define IPC_ERROR(IPC_C, ...) U_LOG_IFL_E((IPC_C)->imc.log_level, __VA_ARGS__)
38383939-/*!
4040- * This define will error if `XRET` is not `XRT_SUCCESS`, printing out that the
4141- * @p FUNC_STR string has failed, then returns @p XRET. The argument @p IPC_C
4242- * will be used to look up the @p cond_level for the @ref ipc_print_result call.
4343- *
4444- * @param IPC_C Client connection, used to look up @p cond_level.
4545- * @param XRET The @p xrt_result_t to check.
4646- * @param FUNC_STR String literal with the function name, used for logging.
4747- *
4848- * @ingroup ipc_client
4949- */
5050-#define IPC_CHK_AND_RET(IPC_C, XRET, FUNC_STR) \
5151- do { \
5252- xrt_result_t _ret = XRET; \
5353- if (_ret != XRT_SUCCESS) { \
5454- ipc_print_result((IPC_C)->imc.log_level, __FILE__, __LINE__, __func__, _ret, FUNC_STR); \
5555- return _ret; \
5656- } \
5757- } while (false)
5858-5959-/*!
6060- * This define will error if `XRET` is not `XRT_SUCCESS`, printing out that the
6161- * @p FUNC_STR string has failed, then gotos @p GOTO. The argument @p IPC_C
6262- * will be used to look up the @p cond_level for the @ref ipc_print_result call.
6363- *
6464- * @param IPC_C Client connection, used to look up @p cond_level.
6565- * @param XRET The @p xrt_result_t to check.
6666- * @param FUNC_STR String literal with the function name, used for logging.
6767- * @param GOTO Goto label to jump to on error.
6868- *
6969- * @ingroup ipc_client
7070- */
7171-#define IPC_CHK_WITH_GOTO(IPC_C, XRET, FUNC_STR, GOTO) \
7272- do { \
7373- xrt_result_t _ret = XRET; \
7474- if (_ret != XRT_SUCCESS) { \
7575- ipc_print_result((IPC_C)->imc.log_level, __FILE__, __LINE__, __func__, _ret, FUNC_STR); \
7676- goto GOTO; \
7777- } \
7878- } while (false)
7979-8080-/*!
8181- * This define will error if `XRET` is not `XRT_SUCCESS`, printing out that the
8282- * @p FUNC_STR string has failed, then returns @p RET. The argument @p IPC_C
8383- * will be used to look up the @p cond_level for the @ref ipc_print_result call.
8484- *
8585- * @param IPC_C Client connection, used to look up @p cond_level.
8686- * @param XRET The @p xrt_result_t to check.
8787- * @param FUNC_STR String literal with the function name, used for logging.
8888- * @param RET The value that is returned on error.
8989- *
9090- * @ingroup ipc_client
9191- */
9292-#define IPC_CHK_WITH_RET(IPC_C, XRET, FUNC_STR, RET) \
9393- do { \
9494- xrt_result_t _ret = XRET; \
9595- if (_ret != XRT_SUCCESS) { \
9696- ipc_print_result((IPC_C)->imc.log_level, __FILE__, __LINE__, __func__, _ret, FUNC_STR); \
9797- return RET; \
9898- } \
9999- } while (false)
100100-101101-/*!
102102- * This define will error if `XRET` is not `XRT_SUCCESS`, printing out that the
103103- * @p FUNC_STR string has failed, it only prints and does nothing else. The
104104- * argument @p IPC_C will be used to look up the @p cond_level for the
105105- * @ref ipc_print_result call.
106106- *
107107- * @param IPC_C Client connection, used to look up @p cond_level.
108108- * @param XRET The @p xrt_result_t to check.
109109- * @param FUNC_STR String literal with the function name, used for logging.
110110- *
111111- * @ingroup ipc_client
112112- */
113113-#define IPC_CHK_ONLY_PRINT(IPC_C, XRET, FUNC_STR) \
114114- do { \
115115- xrt_result_t _ret = XRET; \
116116- if (_ret != XRT_SUCCESS) { \
117117- ipc_print_result((IPC_C)->imc.log_level, __FILE__, __LINE__, __func__, _ret, FUNC_STR); \
118118- } \
119119- } while (false)
120120-121121-/*!
122122- * This define will error if `XRET` is not `XRT_SUCCESS`, printing out that the
123123- * @p FUNC_STR string has failed, then it will always return the value. The
124124- * argument @p IPC_C will be used to look up the @p cond_level for the
125125- * @ref ipc_print_result call.
126126- *
127127- * @param IPC_C Client connection, used to look up @p cond_level.
128128- * @param XRET The @p xrt_result_t to check and always return.
129129- * @param FUNC_STR String literal with the function name, used for logging.
130130- *
131131- * @ingroup ipc_client
132132- */
133133-#define IPC_CHK_ALWAYS_RET(IPC_C, XRET, FUNC_STR) \
134134- do { \
135135- xrt_result_t _ret = XRET; \
136136- if (_ret != XRT_SUCCESS) { \
137137- ipc_print_result((IPC_C)->imc.log_level, __FILE__, __LINE__, __func__, _ret, FUNC_STR); \
138138- } \
139139- return _ret; \
140140- } while (false)
3939+#define IPC_CHK_AND_RET(IPC_C, ...) U_LOG_CHK_AND_RET((IPC_C)->imc.log_level, __VA_ARGS__)
4040+#define IPC_CHK_WITH_GOTO(IPC_C, ...) U_LOG_CHK_WITH_GOTO((IPC_C)->imc.log_level, __VA_ARGS__)
4141+#define IPC_CHK_WITH_RET(IPC_C, ...) U_LOG_CHK_WITH_RET((IPC_C)->imc.log_level, __VA_ARGS__)
4242+#define IPC_CHK_ONLY_PRINT(IPC_C, ...) U_LOG_CHK_ONLY_PRINT((IPC_C)->imc.log_level, __VA_ARGS__)
4343+#define IPC_CHK_ALWAYS_RET(IPC_C, ...) U_LOG_CHK_ALWAYS_RET((IPC_C)->imc.log_level, __VA_ARGS__)
141441424514346/*