summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-24 07:40:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-24 15:37:10 +0200
commit4b623d655bb4f4853a6ce385ae17e505dddbe7ce (patch)
tree2c10939f3fe13e31f37c842e9f73eef7a384b293 /cpukit/score
parentpsxtests/psxmsgq01: Enable test case (diff)
downloadrtems-4b623d655bb4f4853a6ce385ae17e505dddbe7ce.tar.bz2
score: Fix blocking _CORE_message_queue_Submit()
Close #2718.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/coremsgimpl.h4
-rw-r--r--cpukit/score/src/coremsgsubmit.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/coremsgimpl.h b/cpukit/score/include/rtems/score/coremsgimpl.h
index 34f214da6c..395d44dafd 100644
--- a/cpukit/score/include/rtems/score/coremsgimpl.h
+++ b/cpukit/score/include/rtems/score/coremsgimpl.h
@@ -89,8 +89,6 @@ typedef enum {
* to receive a message because one did not become available.
*/
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
- /** This value indicates that a blocking receive was unsuccessful. */
- CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
} CORE_message_queue_Status;
/**
@@ -98,7 +96,7 @@ typedef enum {
*
* This is the last status value.
*/
-#define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
+#define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
/**
* @brief Initialize a message queue.
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 7e589e7754..91fb332e76 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -133,6 +133,7 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
+ executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
@@ -146,6 +147,6 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
lock_context
);
- return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
+ return executing->Wait.return_code;
#endif
}