public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Message boxes - good/bad practices
@ 2002-07-18  4:02 Pete Barrie
  0 siblings, 0 replies; only message in thread
From: Pete Barrie @ 2002-07-18  4:02 UTC (permalink / raw)
  To: ecos-discuss

Message boxes in eCos allow the transmission
of simple (byte up to 32 bits) messages via the
buffered message queue.

Some other OS's deliver more sophisticated (with more overheads)
buffered message schemes where the messages can be any
(parameterised) size.

Obviously a pointer can be sent from one thread to another, for the receiver
to access larger data structures This is clearly not a robust route to data 
sharing.
On on asynchronous basis the buffer space may be clobbered before
the receiver accesses it.
However, the following scenario is probably more robust. What do people
think about the robustness of this one? It implements trivial
synchronous message passing:

Thread_Tx
----------------
malloc space for bufMessage
fill buffer  <size_tag><bytes..........>
send message to thread_Rx with buffer ptr

----
----
wait for reply_message from thread_Rx
fill buffer  <size_tag><bytes..........>
send message to thread_Rx with buffer ptr

etc


Thread_Rx
----------------

wait for message
access buf via pointer and size_tag
send reply_message


Pete


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-18 11:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-18  4:02 [ECOS] Message boxes - good/bad practices Pete Barrie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).