aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-01-21 14:27:29 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-01-21 14:27:29 +0000
commit1c06e1446e46bb1053035923b5367a86ec8815cc (patch)
tree4d691d26f846eee298dd64ff4d4b8b9157688da5 /os
parentf327f603076b6fb5402d650d64c67e0a7b81c74f (diff)
downloadChibiOS-1c06e1446e46bb1053035923b5367a86ec8815cc.tar.gz
ChibiOS-1c06e1446e46bb1053035923b5367a86ec8815cc.tar.bz2
ChibiOS-1c06e1446e46bb1053035923b5367a86ec8815cc.zip
Fixed bug #695.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8788 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/src/hal_buffers.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/os/hal/src/hal_buffers.c b/os/hal/src/hal_buffers.c
index 68c30c5a4..2f4e0339c 100644
--- a/os/hal/src/hal_buffers.c
+++ b/os/hal/src/hal_buffers.c
@@ -365,14 +365,9 @@ size_t ibqReadTimeout(input_buffers_queue_t *ibqp, uint8_t *bp,
if (ibqp->ptr == NULL) {
msg_t msg;
- /* TIME_IMMEDIATE is a special case, never wait.*/
- if (timeout == TIME_IMMEDIATE) {
- osalSysUnlock();
- return r;
- }
-
- /* TIME_INFINITE is handled differently, no deadline.*/
- if (timeout == TIME_INFINITE) {
+ /* TIME_INFINITE and TIME_IMMEDIATE are handled differently, no
+ deadline.*/
+ if ((timeout == TIME_INFINITE) || (timeout == TIME_IMMEDIATE)) {
msg = ibqGetFullBufferTimeoutS(ibqp, timeout);
}
else {
@@ -743,14 +738,9 @@ size_t obqWriteTimeout(output_buffers_queue_t *obqp, const uint8_t *bp,
if (obqp->ptr == NULL) {
msg_t msg;
- /* TIME_IMMEDIATE is a special case, never wait.*/
- if (timeout == TIME_IMMEDIATE) {
- osalSysUnlock();
- return w;
- }
-
- /* TIME_INFINITE is handled differently, no deadline.*/
- if (timeout == TIME_INFINITE) {
+ /* TIME_INFINITE and TIME_IMMEDIATE are handled differently, no
+ deadline.*/
+ if ((timeout == TIME_INFINITE) || (timeout == TIME_IMMEDIATE)) {
msg = obqGetEmptyBufferTimeoutS(obqp, timeout);
}
else {