Helper to implement xrt_future, A basic CPU based future implementation.
More...
#include "u_future.h"
#include "util/u_debug.h"
#include "util/u_logging.h"
#include "os/os_threading.h"
#include <errno.h>
#include <atomic>
#include <memory>
|
|
#define | UFT_LOG_T(...) U_LOG_IFL_T(debug_get_log_option_log_level_future(), __VA_ARGS__) |
| |
|
#define | UFT_LOG_D(...) U_LOG_IFL_D(debug_get_log_option_log_level_future(), __VA_ARGS__) |
| |
|
#define | UFT_LOG_I(...) U_LOG_IFL_I(debug_get_log_option_log_level_future(), __VA_ARGS__) |
| |
|
#define | UFT_LOG_W(...) U_LOG_IFL_W(debug_get_log_option_log_level_future(), __VA_ARGS__) |
| |
|
#define | UFT_LOG_E(...) U_LOG_IFL_E(debug_get_log_option_log_level_future(), __VA_ARGS__) |
| |
|
#define | U_FUTURE_CLEANUP_TIMEOUT_NS (3000000000LL) |
| |
|
|
static xrt_result_t | u_future_get_xrt_result (const struct u_future *uft) |
| |
|
static xrt_future_state_t | u_future_get_state_priv (const struct u_future *uft) |
| |
|
static void | u_future_set_xrt_result (struct u_future *uft, const xrt_result_t result) |
| |
|
static void | u_future_set_state (struct u_future *uft, const xrt_future_state_t new_state) |
| |
| static void | u_future_set_state_and_xrt_result (struct u_future *uft, const xrt_future_state_t new_state, const xrt_result_t result) |
| | internal helper only, does not atomically set both. More...
|
| |
|
static xrt_result_t | u_future_get_state (const struct xrt_future *xft, enum xrt_future_state *out_state) |
| |
|
static xrt_result_t | u_future_get_result (const struct xrt_future *xft, struct xrt_future_result *out_result) |
| |
|
static xrt_result_t | u_future_cancel (struct xrt_future *xft) |
| |
|
static xrt_result_t | u_future_wait (struct xrt_future *xft, int64_t timeout_ns) |
| |
|
static xrt_result_t | u_future_is_cancel_requested (const struct xrt_future *xft, bool *out_request_cancel) |
| |
|
static xrt_result_t | u_future_complete (struct xrt_future *xft, const struct xrt_future_result *ft_result) |
| |
|
static void | u_future_destroy (struct xrt_future *xft) |
| |
|
struct xrt_future * | u_future_create (void) |
| |
◆ u_future_set_state_and_xrt_result()
internal helper only, does not atomically set both.