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"
pull/2387/head
Alessandro Angelino 2016-08-08 12:43:23 +01:00
parent 2f2fbc49a5
commit 69101b84d4
1 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,6 @@
typedef uint32_t uvisor_rpc_result_t; typedef uint32_t uvisor_rpc_result_t;
typedef uint32_t (*TFN_Ptr)(uint32_t, uint32_t, uint32_t, uint32_t); typedef uint32_t (*TFN_Ptr)(uint32_t, uint32_t, uint32_t, uint32_t);
typedef int (*TFN_RPC_Callback)(int);
/** Wait for incoming RPC. /** 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 * @param timeout_ms specifies how long to wait (in ms) for an incoming RPC
* message before returning * 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__ */ #endif /* __UVISOR_API_RPC_H__ */