Browse Source

Fixed msgQSend() called in ISR mode.

master
Hanhui 9 years ago
parent
commit
604008ff94
  1. 10
      target/src/msgQLib.c

10
target/src/msgQLib.c

@ -181,8 +181,16 @@ STATUS msgQSend (MSG_Q_ID msgQId, char *buffer, UINT nBytes,
return (ERROR);
}
ulError = API_SemaphoreBPend(msgQId->wrSync, vx2syMsgQTo(timeout));
if (API_InterGetNesting()) {
errno = ERROR_MSGQUEUE_FULL;
return (ERROR);
} else {
ulError = API_SemaphoreBPend(msgQId->wrSync, vx2syMsgQTo(timeout));
}
if (ulError) {
errno = ERROR_MSGQUEUE_FULL;
return (ERROR);
}
}

Loading…
Cancel
Save