public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Pete Barrie <peter@cis.strath.ac.uk>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Message boxes - good/bad practices
Date: Thu, 18 Jul 2002 04:02:00 -0000	[thread overview]
Message-ID: <5.1.0.14.0.20020718113159.025c3008@pophost.cs.strath.ac.uk> (raw)

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

                 reply	other threads:[~2002-07-18 11:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.0.20020718113159.025c3008@pophost.cs.strath.ac.uk \
    --to=peter@cis.strath.ac.uk \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).