Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define OMXRPC_STUB_TEMPLATE(pRpcHndl,pRpcMsg,retVal,cmdId,stubId, \
- marshallApiParams, \
- unMarshallApiParams,nCmdStatus) \
- do { \
- RcmClient_Message *rcmMsg; \
- Bool msgAllocDone = FALSE; \
- \
- DOMX_UTL_TRACE_FUNCTION_ASSERT ((TRUE == \
- OmxRpc_module->localCoreRcmServer.initDone),\
- "localCoreRcmServer init not done"); \
- DOMX_UTL_TRACE_FUNCTION_ASSERT ((NULL != pRpcHndl), "rpcHandle is NULL"); \
- DOMX_UTL_TRACE_FUNCTION_ASSERT \
- ((TRUE == \
- OmxRpc_module->remoteCoreRcmClient[pRpcHndl->remoteCoreId].initDone), \
- "remoteCoreRcmClient init not done"); \
- \
- /* allocate a remote command message */ \
- retVal = OmxRpc_rcmMsgAlloc ((RcmClient_Handle)pRpcHndl->client.handle, \
- &rcmMsg, \
- __FILE__, \
- __LINE__); \
- if (OmxRpc_errorNone == retVal) \
- { \
- UInt32 fxnId; \
- \
- msgAllocDone = TRUE; \
- pRpcMsg = (OmxRpc_msg * )(&rcmMsg->data); \
- /* Packing GetHandle messages */ \
- /* Filling common part of the message */ \
- OmxRpc_msgMarshallCommonStub (pRpcMsg, \
- pRpcHndl, \
- pRpcHndl->layer.stub.skelHandle, \
- cmdId); \
- omxrpc_msg_marshall_##stubId marshallApiParams; \
- if ((OmxRpc_cmdCreateProxyLite == cmdId) || \
- (OmxRpc_cmdFreeHandle == cmdId)) \
- { \
- fxnId = \
- OmxRpc_module->remoteCoreRcmClient[pRpcHndl->remoteCoreId].fxns. \
- cmd2fxnIdxMap[cmdId]; \
- } \
- else \
- { \
- fxnId = pRpcHndl->client.fxns.cmd2fxnIdxMap[cmdId]; \
- } \
- retVal = OmxRpc_rcmExec ((RcmClient_Handle)pRpcHndl->client.handle, \
- rcmMsg, \
- fxnId); \
- if (OmxRpc_errorNone == retVal) \
- { \
- OmxRpc_msgUnmarshallCommonStub(&pRpcMsg->common,nCmdStatus); \
- omxrpc_msg_unmarshall_##stubId##_response unMarshallApiParams; \
- } \
- } /* end of if (rcmMsgAlloc success) */ \
- if (msgAllocDone) \
- { \
- /* If msg was successfully executed free return the Rcm Msg to heap */ \
- RcmClient_free ((RcmClient_Handle)pRpcHndl->client.handle, \
- rcmMsg); \
- } \
- \
- } while (g_KillLoopInvariantWarning)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement