C Specification

To declare a thread to be of a certain XrAndroidThreadTypeKHR type call:

XrResult xrSetAndroidApplicationThreadKHR(
    XrSession                                   session,
    XrAndroidThreadTypeKHR                      threadType,
    uint32_t                                    threadId);

Parameters

Parameter Descriptions
  • session is a valid XrSession handle.

  • threadType is a classification of the declared thread allowing the XR runtime to apply the relevant priority and attributes. If such settings fail, the error XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR is returned.

  • threadId is the thread id of the declared thread. If thread Id is invalid the error XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR is returned.

Description

xrSetAndroidApplicationThreadKHR allows to declare an XR-critical thread and to classify it.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR

  • XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_FUNCTION_UNSUPPORTED

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.