[coyotos-dev] IDL compatibility
Charles Landau
clandau at macslab.com
Mon Jun 18 13:27:02 EDT 2007
At 10:54 AM -0400 6/18/07, Jonathan S. Shapiro wrote:
>On Sun, 2007-06-17 at 12:08 +0200, Valerio Bellizzomi wrote:
>> On 16/06/2007, at 18.53, Charles Landau wrote:
>>
>> >To the extent that Coyotos and CapROS have similar objects, it would
>> >be very good if programs that use those objects were compatible
>> >across the two systems. Both systems use IDL, so differences in the
>> >details of how you invoke a capability are probably not an issue.
>> >
>> >Because Coyotos packages are all under the namespace "coyotos",
>> >procedures to call an object such as the spacebank will have names
> > >like "coyotos_spacebank_alloc". In CapROS the corresponding procedure
>> >names begin with "eros" (or perhaps "capros"). So even if the
>> >semantics matches, the procedure names of every key invocation would
>> >have to be changed to move a program from one system to another. Not
>> >exactly a good compatibility story.
>> >
>> >Is there a better way?
>>
>> Use a "system" namespace, we would have "system_spacebank_alloc"
>> everywhere.
>
>Yes, calls to the spacebank methods in coyotos will begin with coyotos_.
>This is intentional and necessary. The two systems do not implement
>identical interfaces, and it is therefore not appropriate or desirable
>for them to use the same method namespace. Quite the contrary: if there
>is to be ANY hope at all of cross-compatibility, it is *imperative* that
>these name spaces not overlap.
>
> PLEASE do NOT switch to something like "system_".
So, thinking about how you would port a program, say from Coyotos to
CapROS, without major rewriting:
In cases where methods are identical (and there will be some), you could
#include <coyotosCompatibility.h>
which contains for example
#define coyotos_spacebank_alloc capros_spacebank_alloc
(or better, define coyotos_spacebank_alloc as an inline function that
calls capros_spacebank_alloc)
Is this what you have in mind?
More information about the coyotos-dev
mailing list