From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Interfacing with C: access/out parameters
Date: Tue, 31 Aug 2004 11:41:48 +0200
Date: 2004-08-31T11:41:48+02:00 [thread overview]
Message-ID: <2pivcgFl9kl2U1@uni-berlin.de> (raw)
In-Reply-To: <_UKYc.2897$w%6.1362@newsread1.news.pas.earthlink.net>
Jeffrey Carter wrote:
> 1. What are the explicit timing requirements for this software?
>
> 2. Does it fail to meet these requirements?
>
> 3. If so, is eliminating this assignment the only way to meet the timing
> requirements?
>
> I have never encountered SW where these could all be answered "Yes".
>
> Probably you don't want your software to be using C-convention types for
> anything except the interface to C, so you'd want your thick binding to
> have an Ada-convention type for Datum, and assign the fields of Helper
> to it. Horrors! Multiple assignments!
Thanks for the responses and sorry for the error in the example.
As you have already guessed, I want to get rid (if possible) of the
copy. I can't say for sure that my soft answers "yes" to your three
questions, but evaluate for yourself:
I'm writing a (initially thin) binding for the Player/Stage robot server
(http://playerstage.sf.net). The function we are talking about is a
generic message passing one were messages are normally little (up to
8kB) but could be (almost) arbitrarily bigger. Message communication
occurs at a configurable pace but the default is 10Khz if memory serves
well.
As you see, is a function which is used often, by other, more
specialized communication functions. Being a binding, any code using it
would pass by this "bottleneck".
It's for these reasons that I would want to have the optimal high level
solution, and eliminating the copy of the returned data seems a sensible
desire. There is that mentioned Import_Valued_Procedure in Gnat which
addresses this Ada shortcoming, but talking about a binding, I want it
to be totally portable if possible.
As per the C convention types all around the place, my intention is to
build (if time permits) a thick binding over this thin binding, so that
can be isolated later.
Further ideas? Is there anything definitely unadvisable in my original
solution? (The one using limited/tagged types and 'Address).
Thanks!
next prev parent reply other threads:[~2004-08-31 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 17:30 Interfacing with C: access/out parameters Jano
2004-08-30 19:06 ` Jeffrey Carter
2004-08-31 9:41 ` Alex R. Mosteo [this message]
2004-08-31 9:48 ` Alex R. Mosteo
2004-08-31 18:26 ` Jeffrey Carter
2004-09-01 9:46 ` Alex R. Mosteo
2004-08-31 7:54 ` Egil H. H�vik
2004-08-31 9:11 ` Egil H. H�vik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox