33
33
typedef uint32_t uvisor_rpc_result_t ;
34
34
35
35
typedef uint32_t (* TFN_Ptr )(uint32_t , uint32_t , uint32_t , uint32_t );
36
- typedef int (* TFN_RPC_Callback )(int );
37
36
38
37
/** Wait for incoming RPC.
39
38
*
@@ -43,6 +42,21 @@ typedef int (*TFN_RPC_Callback)(int);
43
42
* @param timeout_ms specifies how long to wait (in ms) for an incoming RPC
44
43
* message before returning
45
44
*/
46
- int rpc_fncall_waitfor (const TFN_Ptr fn_ptr_array [], size_t fn_count , uint32_t timeout_ms );
45
+ UVISOR_EXTERN int rpc_fncall_waitfor (const TFN_Ptr fn_ptr_array [], size_t fn_count , uint32_t timeout_ms );
46
+
47
+ /** Wait for an outgoing RPC to finish.
48
+ *
49
+ * Wait for the result of a previously started asynchronous RPC. After this
50
+ * call, ret will contain the return value of the RPC. The return value of this
51
+ * function may indicate that there was an error or a timeout with non-zero.
52
+ *
53
+ * @param result[in] The token to wait on for the result of an asynchronous RPC
54
+ * @param timeout_ms[in] How long to wait (in ms) for the asynchronous RPC
55
+ * message to finish before returning
56
+ * @param ret[out] The return value resulting from the finished RPC to
57
+ * the target function
58
+ * @returns Non-zero on error or timeout, zero on successful wait
59
+ */
60
+ UVISOR_EXTERN int rpc_fncall_wait (uvisor_rpc_result_t result , uint32_t timeout_ms , uint32_t * ret );
47
61
48
62
#endif /* __UVISOR_API_RPC_H__ */
0 commit comments