/* Get a Message or Wait for a Message from a Queue.  */
os_InRegs osEvent_type svcMessageGet(osMessageQId queue_id, uint32_t millisec)
/* Get a Message or Wait for a Message from a Queue.  */
os_InRegs osEvent_type svcMessageGet(osMessageQId queue_id, uint32_t millisec)
{
    ret.status = osErrorParameter;
    return osEvent_ret_status;
  }
  if (((P_MCB)queue_id)->cb_type != MCB) {
    ret.status = osErrorParameter;
    return osEvent_ret_status;
  }
  res = rt_mbx_wait(queue_id, &ret.value.p, rt_ms2tick(millisec));
  if (res == OS_R_TMO) {
    ret.status = (millisec != 0U) ? osEventTimeout : osOK;
    return osEvent_ret_value;
  }
  ret.status = osEventMessage;
  return osEvent_ret_value;
}