int OSA_tskWaitMsg(OSA_TskHndl *pPrc, OSA_MsgHndl **pMsg) { int retVal; retVal = OSA_mbxWaitMsg(&pPrc->mbxHndl, pMsg); return retVal; }
int OSA_mbxWaitCmd(OSA_MbxHndl *pMbxHndl, OSA_MsgHndl **pMsg, Uint16 waitCmd) { OSA_MsgHndl *pRcvMsg; while(1) { OSA_mbxWaitMsg(pMbxHndl, &pRcvMsg); if(OSA_msgGetCmd(pRcvMsg)==waitCmd) break; OSA_mbxAckOrFreeMsg(pRcvMsg, OSA_SOK); } if(pMsg==NULL) { OSA_mbxAckOrFreeMsg(pRcvMsg, OSA_SOK); } else { *pMsg = pRcvMsg; } return OSA_SOK; }