public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: bartv@redhat.com
Cc: RBalakum@chn.cts-corp.com, ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] Variable size Message boxes
Date: Tue, 31 Oct 2000 09:17:00 -0000	[thread overview]
Message-ID: <39FEFE78.7E34E734@redhat.com> (raw)
In-Reply-To: <200010311307.e9VD7pB28580@sheesh.cygnus>

Bart Veer wrote:
> 
> >>>>> "Rajendran," == Rajendran, Balakumaran (CTS) <RBalakum@chn.cts-corp.com> writes:
> 
>     Rajendran> I need to create message boxes of variable sizes for my
>     Rajendran> application. In ECOS, the size of the message box can
>     Rajendran> be configured by the
>     Rajendran> CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE parameter. But all
>     Rajendran> the message boxes created will be of the same size. Is
>     Rajendran> there a way by which variable size message boxes can be
>     Rajendran> created and used?
> 
> Not with the message boxes provided by the kernel.
> 
> It is not clear whether you want message boxes which can change size
> dynamically, or if you want message boxes of different but fixed sizes.

It the latter you can use POSIX message queues from <mqueue.h> from the
EL/IX code in CVS. Or even use the Cyg_MQueue type which is part of the
kernel, in <cyg/kernel/mqueue.hxx>, but which is not part of the *exported*
API because it is solely present to support POSIX message queues. This
means C++ for a start, and the documentation for that API is whatever is in
mqueue.hxx :-). It's a private internal API.
 
> The former would require some form of dynamic memory allocation, i.e.
> if you post to a full message box then the kernel would need to extend
> the message box.

There's a simpler way to do it. Just make the kernel message boxes take
void *'s, and then it is up to the *application* to malloc stuff, and then
when it is received, free it. That is the intended use of the kernel
message boxes to make the implementation simplest and fastest.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

  reply	other threads:[~2000-10-31  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-30 20:49 Rajendran, Balakumaran (CTS)
2000-10-31  5:08 ` Bart Veer
2000-10-31  9:17   ` Jonathan Larmour [this message]
2000-10-31  9:37     ` Bart Veer

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=39FEFE78.7E34E734@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=RBalakum@chn.cts-corp.com \
    --cc=bartv@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.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).