xrt: add new xrt_result_t error codes

* adds generic and future specific error codes

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2554>
This commit is contained in:
Korcan Hussein authored and Marge Bot committed 2025-10-28 16:34:12 +00:00
1 parent 57a9631a2f
commit 05fc05ca0b
2 files changed
+24

No files matched your search

+4
View File
@@ -228,6 +228,10 @@ u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret)
case XRT_ERROR_SYNC_PRIMITIVE_CREATION_FAILED: DG("XRT_ERROR_SYNC_PRIMITIVE_CREATION_FAILED"); return;
case XRT_ERROR_IPC_SERVICE_ALREADY_RUNNING: DG("XRT_ERROR_IPC_SERVICE_ALREADY_RUNNING"); return;
case XRT_ERROR_IPC_MAINLOOP_FAILED_TO_INIT: DG("XRT_ERROR_IPC_MAINLOOP_FAILED_TO_INIT"); return;
case XRT_ERROR_INVALID_ARGUMENT: DG("XRT_ERROR_INVALID_ARGUMENT"); return;
case XRT_OPERATION_CANCELLED: DG("XRT_OPERATION_CANCELLED"); return;
case XRT_ERROR_FUTURE_RESULT_NOT_READY: DG("XRT_ERROR_FUTURE_RESULT_NOT_READY"); return;
case XRT_ERROR_FUTURE_ALREADY_COMPLETE: DG("XRT_ERROR_FUTURE_ALREADY_COMPLETE"); return;
}
// clang-format on
+20
View File
@@ -38,6 +38,11 @@ typedef enum xrt_result
*/
XRT_SPACE_BOUNDS_UNAVAILABLE = 3,
/*!
* An (asynchronous) operation has been cancelled.
*/
XRT_OPERATION_CANCELLED = 4,
/*!
* A problem occurred either with the IPC transport itself, with invalid commands from the client, or with
* invalid responses from the server.
@@ -231,4 +236,19 @@ typedef enum xrt_result
* The IPC server couldn't starts it mainloop.
*/
XRT_ERROR_IPC_MAINLOOP_FAILED_TO_INIT = -38,
/*!
* Invalid function arguments passed in, e.g. null or out-of-range values.
*/
XRT_ERROR_INVALID_ARGUMENT = -39,
/*!
* Querying result of a future before it is ready.
*/
XRT_ERROR_FUTURE_RESULT_NOT_READY = -40,
/*!
* Invoking complete on an already completed future
*/
XRT_ERROR_FUTURE_ALREADY_COMPLETE = -41,
} xrt_result_t;