inc/xrt: Add defines for underlying handle type

This commit is contained in:
Ryan Pavlik 2020-07-20 15:52:23 -05:00 committed by Jakob Bornecrantz
parent 663f5467b4
commit 8889f81194
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1 @@
Add defines for underlying handle types.

View file

@ -24,6 +24,13 @@ extern "C" {
*/
typedef int xrt_shmem_handle_t;
/*!
* Defined to allow detection of the underlying type.
*
* @relates xrt_shmem_handle_t
*/
#define XRT_SHMEM_HANDLE_IS_FD 1
/*!
* Check whether a shared memory handle is valid.
*
@ -56,6 +63,13 @@ typedef struct AHardwareBuffer AHardwareBuffer;
*/
typedef AHardwareBuffer *xrt_graphics_buffer_handle_t;
/*!
* Defined to allow detection of the underlying type.
*
* @relates xrt_graphics_buffer_handle_t
*/
#define XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER 1
/*!
* Check whether a graphics buffer handle is valid.
*
@ -87,6 +101,13 @@ xrt_graphics_buffer_is_valid(xrt_graphics_buffer_handle_t handle)
*/
typedef int xrt_graphics_buffer_handle_t;
/*!
* Defined to allow detection of the underlying type.
*
* @relates xrt_graphics_buffer_handle_t
*/
#define XRT_GRAPHICS_BUFFER_HANDLE_IS_FD 1
/*!
* Check whether a graphics buffer handle is valid.
*