git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10826 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
Giovanni Di Sirio 2017-10-15 11:49:26 +00:00
parent fe3507eb99
commit d603586e33
3 changed files with 10 additions and 6 deletions

View File

@ -510,7 +510,7 @@ osStatus osMessagePut(osMessageQId queue_id,
chSysUnlockFromISR();
}
else
msg = chMBPost((mailbox_t *)queue_id, (msg_t)info, timeout);
msg = chMBPostTimeout((mailbox_t *)queue_id, (msg_t)info, timeout);
return msg == MSG_OK ? osOK : osEventTimeout;
}
@ -541,7 +541,7 @@ osEvent osMessageGet(osMessageQId queue_id,
chSysUnlockFromISR();
}
else {
msg = chMBFetch((mailbox_t *)queue_id, (msg_t*)&event.value.v, timeout);
msg = chMBFetchTimeout((mailbox_t *)queue_id, (msg_t*)&event.value.v, timeout);
}
/* Returned event type.*/

View File

@ -819,21 +819,21 @@ int32 OS_QueueGet(uint32 queue_id, void *data, uint32 size,
/* Special time handling.*/
if (timeout == OS_PEND) {
msgsts = chMBFetch(&oqp->mb, &msg, TIME_INFINITE);
msgsts = chMBFetchTimeout(&oqp->mb, &msg, TIME_INFINITE);
if (msgsts < MSG_OK) {
*size_copied = 0;
return OS_ERROR;
}
}
else if (timeout == OS_CHECK) {
msgsts = chMBFetch(&oqp->mb, &msg, TIME_IMMEDIATE);
msgsts = chMBFetchTimeout(&oqp->mb, &msg, TIME_IMMEDIATE);
if (msgsts < MSG_OK) {
*size_copied = 0;
return OS_QUEUE_EMPTY;
}
}
else {
msgsts = chMBFetch(&oqp->mb, &msg, (systime_t)timeout);
msgsts = chMBFetchTimeout(&oqp->mb, &msg, (systime_t)timeout);
if (msgsts < MSG_OK) {
*size_copied = 0;
return OS_QUEUE_TIMEOUT;
@ -901,7 +901,7 @@ int32 OS_QueuePut(uint32 queue_id, void *data, uint32 size, uint32 flags) {
memcpy(omsg->buf, data, size);
/* Posting the message.*/
msgsts = chMBPost(&oqp->mb, (msg_t)omsg, TIME_INFINITE);
msgsts = chMBPostTimeout(&oqp->mb, (msg_t)omsg, TIME_INFINITE);
if (msgsts < MSG_OK) {
return OS_ERROR;
}

View File

@ -89,6 +89,10 @@
*****************************************************************************
*** Next ***
- NEW: Updated STM32F1xx headers to 1.6, STM32F3xx to 1.9, STM32L0xx to 1.10,
STM32L4xx to 1.9, STM32H7xx to 1.1.
- NEW: Updated CMSIS to 5.1.1, changed directories organization under
/os/ext/ARM/CMSIS to match the one in CMSIS, removed /os/ext/CMSIS.
- NEW: Integrated lwIP 2.0.3 and improved lwIP bindings.
- NEW: The chconf.h configuration files now are tagged with the version
number for safety. The system rejects obsolete files during