示例#1
0
int OSA_tskWaitMsg(OSA_TskHndl *pPrc, OSA_MsgHndl **pMsg)
{
  int retVal;

  retVal = OSA_mbxWaitMsg(&pPrc->mbxHndl, pMsg);

  return retVal;
}
示例#2
0
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;
}