Monado OpenXR Runtime
u_future Struct Reference

A helper to implement a xrt_future, a basic CPU based future implementation. More...

Inheritance diagram for u_future:
Collaboration diagram for u_future:

Data Fields

struct xrt_future base
 
struct os_mutex mtx
 
struct os_cond cv
 
std::atomic< xrt_future_state_tstate {XRT_FUTURE_STATE_PENDING}
 
std::atomic< xrt_result_tresult {XRT_SUCCESS}
 
struct xrt_future_value value = XRT_NULL_FUTURE_VALUE
 
- Data Fields inherited from xrt_future
struct xrt_reference reference
 Reference helper. More...
 
void(* destroy )(struct xrt_future *xft)
 Destroys the future. More...
 
xrt_result_t(* get_state )(const struct xrt_future *xft, enum xrt_future_state *out_state)
 Gets the current state of the future. More...
 
xrt_result_t(* get_result )(const struct xrt_future *xft, struct xrt_future_result *out_result)
 Gets the future results (after async operation has finished) More...
 
xrt_result_t(* cancel )(struct xrt_future *xft)
 Signals an asynchronous operation associated with the future to cancel. More...
 
xrt_result_t(* wait )(struct xrt_future *xft, int64_t timeout_ns)
 Waits on a pending/cancelled future. More...
 
xrt_result_t(* is_cancel_requested )(const struct xrt_future *xft, bool *out_request_cancel)
 Waits on a cancelled future. More...
 
xrt_result_t(* complete )(struct xrt_future *xft, const struct xrt_future_result *ft_result)
 Signals that the asynchronous operation has completed and sets the future’s result. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from xrt_future
static xrt_result_t xrt_future_get_result (const struct xrt_future *xft, struct xrt_future_result *out_result)
 Helper function for xrt_future::get_result. More...
 
static xrt_result_t xrt_future_get_state (const struct xrt_future *xft, enum xrt_future_state *out_state)
 Helper function for xrt_future::get_state. More...
 
static xrt_result_t xrt_future_cancel (struct xrt_future *xft)
 Helper function for xrt_future::cancel. More...
 
static xrt_result_t xrt_future_wait (struct xrt_future *xft, int64_t timeout)
 Helper function for xrt_future::wait. More...
 
static xrt_result_t xrt_future_is_cancel_requested (const struct xrt_future *xft, bool *out_request_cancel)
 Helper function for xrt_future::is_cancel_requested. More...
 
static xrt_result_t xrt_future_complete (struct xrt_future *xft, const struct xrt_future_result *ft_result)
 Helper function for xrt_future::complete. More...
 

Detailed Description

A helper to implement a xrt_future, a basic CPU based future implementation.


The documentation for this struct was generated from the following file: