From 69101b84d41c68ccd1c3bdeac107f6f888624e25 Mon Sep 17 00:00:00 2001 From: Alessandro Angelino Date: Mon, 8 Aug 2016 12:43:23 +0100 Subject: [PATCH] uVisor: Update the RPC header files This follows: ARMmbed/uvisor#02ecf05 - "Remove unused TFN_RPC_Callback" ARMmbed/uvisor#483ddda - "rpc: Add `rpc_fncall_wait`" ARMmbed/uvisor#fdb7dce - "rpc: Add missing UVISOR_EXTERN to rpc_fncall_waitfor declaration" --- .../includes/uvisor/api/inc/rpc.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/features/FEATURE_UVISOR/includes/uvisor/api/inc/rpc.h b/features/FEATURE_UVISOR/includes/uvisor/api/inc/rpc.h index 8bee897bff..b1a89cef5a 100644 --- a/features/FEATURE_UVISOR/includes/uvisor/api/inc/rpc.h +++ b/features/FEATURE_UVISOR/includes/uvisor/api/inc/rpc.h @@ -33,7 +33,6 @@ typedef uint32_t uvisor_rpc_result_t; typedef uint32_t (*TFN_Ptr)(uint32_t, uint32_t, uint32_t, uint32_t); -typedef int (*TFN_RPC_Callback)(int); /** Wait for incoming RPC. * @@ -43,6 +42,21 @@ typedef int (*TFN_RPC_Callback)(int); * @param timeout_ms specifies how long to wait (in ms) for an incoming RPC * message before returning */ -int rpc_fncall_waitfor(const TFN_Ptr fn_ptr_array[], size_t fn_count, uint32_t timeout_ms); +UVISOR_EXTERN int rpc_fncall_waitfor(const TFN_Ptr fn_ptr_array[], size_t fn_count, uint32_t timeout_ms); + +/** Wait for an outgoing RPC to finish. + * + * Wait for the result of a previously started asynchronous RPC. After this + * call, ret will contain the return value of the RPC. The return value of this + * function may indicate that there was an error or a timeout with non-zero. + * + * @param result[in] The token to wait on for the result of an asynchronous RPC + * @param timeout_ms[in] How long to wait (in ms) for the asynchronous RPC + * message to finish before returning + * @param ret[out] The return value resulting from the finished RPC to + * the target function + * @returns Non-zero on error or timeout, zero on successful wait + */ +UVISOR_EXTERN int rpc_fncall_wait(uvisor_rpc_result_t result, uint32_t timeout_ms, uint32_t * ret); #endif /* __UVISOR_API_RPC_H__ */