summaryrefslogtreecommitdiffstats
path: root/cpukit/itron/src/tsnd_mbf.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 19:25:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 19:25:15 +0000
commit53fb837afc4285486e318bcb614c911bbe9b1348 (patch)
treecdd9b6ff2a66e8f5c746a06d1e639be4c01c6941 /cpukit/itron/src/tsnd_mbf.c
parentMissed removing this file in an earlier commit. This is removed (diff)
downloadrtems-53fb837afc4285486e318bcb614c911bbe9b1348.tar.bz2
POSIX message queues now include complete functionality including
blocking sends when the queue is full. The SuperCore was enhanced to support blocking on send. The existing POSIX API was debugged and numerous test cases were added to psxmsgq01 by Jennifer Averett. SuperCore enhancements and resulting modifications to other APIs were done by Joel. There is one significant point of interpretation for the POSIX API. What happens to threads already blocked on a message queue when the mode of that same message queue is changed from blocking to non-blocking? We decided to unblock all waiting tasks with an EAGAIN error just as if a non-blocking version of the same operation had returned unsatisfied. This case is not discussed in the POSIX standard and other implementations may have chosen differently.
Diffstat (limited to '')
-rw-r--r--cpukit/itron/src/tsnd_mbf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpukit/itron/src/tsnd_mbf.c b/cpukit/itron/src/tsnd_mbf.c
index bc609dd298..0ed3b4f90e 100644
--- a/cpukit/itron/src/tsnd_mbf.c
+++ b/cpukit/itron/src/tsnd_mbf.c
@@ -33,7 +33,6 @@ ER tsnd_mbf(
Objects_Locations location;
Watchdog_Interval interval;
boolean wait;
- CORE_message_queue_Status status;
if (msgsz <= 0 || !msg)
return E_PAR;
@@ -50,8 +49,6 @@ ER tsnd_mbf(
if ( wait && _ITRON_Is_in_non_task_state() )
return E_CTX;
- assert( wait == FALSE );
-
the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
switch (location) {
case OBJECTS_REMOTE:
@@ -60,17 +57,20 @@ ER tsnd_mbf(
case OBJECTS_LOCAL:
/* XXX Submit needs to take into account blocking */
- status = _CORE_message_queue_Submit(
+ _CORE_message_queue_Submit(
&the_message_buffer->message_queue,
msg,
msgsz,
the_message_buffer->Object.id,
NULL,
- CORE_MESSAGE_QUEUE_SEND_REQUEST
+ CORE_MESSAGE_QUEUE_SEND_REQUEST,
+ wait, /* sender may block */
+ interval /* timeout interval */
);
_Thread_Enable_dispatch();
- return
- _ITRON_Message_buffer_Translate_core_message_buffer_return_code(status);
+ return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
+ _Thread_Executing->Wait.return_code
+ );
}
/*