[ECOS] Variable size Message boxes
Tue Oct 31 05:08:00 GMT 2000
>>>>> "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.
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. This would add a lot of overhead to the message box
code, and would add a new dependency on dynamic memory allocation
support for some applications which previously had no such
requirement. It would make it impossible to post to a message box from
inside a DSR since the post operation might now have to block in the
malloc code. It would also introduce a new failure condition. If you
do need this functionality then it can be implemented at the
application level, probably using a condition variable.
The latter is also not currently supported and would have to be
implemented. There would be initialization problems, the basic mbox
data structure would have to be separate from the queue, and there
would be some performance penalties. For most applications a
fixed-size queue is sufficient.
Rajendran> This e-mail and any files transmitted with it are for
Rajendran> the sole use
Please do not use bogus signatures like this when posting to public
mailing lists like ecos-discuss. They are meaningless and a waste of
Bart Veer // eCos net maintainer
More information about the Ecos-discuss