[Barrelfish-users] Interface types

Baumann Andrew andrewb at inf.ethz.ch
Wed Nov 2 17:43:58 CET 2011


Hi Georgios,

This probably sounds silly, but are you sure? I get a different error message:

$ cat ~/src/barrelfish/drawbridge/if/bdis.if
interface bdis "BDIS interface" {

        typedef struct {
                uint8 f1;
                uint8 f2;
        } mytype;

        message mymsg(uint8 arg1[99]);
}
$ tools/bin/flounder -i /home/baumann/src/barrelfish/drawbridge/if/platform/x86_64.if -i /home/baumann/src/barrelfish/drawbridge/if/arch/x86_64.if -i ~/src/barrelfish/drawbridge/if/types.if  --generic-header ~/src/barrelfish/drawbridge/if/bdis.if bdis_defs.h
Parse error at: "/home/baumann/src/barrelfish/drawbridge/if/bdis.if" (line 8, column 33):
unexpected "["
expecting letter or digit, "," or ")"

In this case I think my error is because you can't use a statically-sized array directly in a message argument: you need to typedef it elsewhere. I also know typedefs of structs work, because there is code in the tree that uses them (e.g. intermon.if). Perhaps there is something else affecting your interface file leading to the "unexpected t"?

Andrew

> -----Original Message-----
> From: Georgios Varisteas [mailto:yorgos at kth.se]
> Sent: Wednesday, 2 November 2011 17:34
> To: Baumann Andrew; barrelfish-users at lists.inf.ethz.ch
> Subject: RE: Interface types
> 
> Hi Andrew,
> 
> Here is a sample:
> 
> interface bdis "BDIS interface" {
> 
> 	typedef struct {
> 		uint8 f1;
> 		uint8 f2;
> 	} mytype;
> 
> 	message mymsg(uint8 arg1[99]);
> }
> 
> The typedef will result in the following error:
> 
> ./tools/bin/flounder -i ../src/if/platform/x86_64.if -i ../src/if/arch/x86_64.if -i
> ../src/if/types.if --generic-header ../src/if/bdis.if
> ./x86_64/include/if/bdis_defs.h
> Parse error at: "../src/if/bdis.if" (line 11, column 9):
> unexpected "t"
> expecting "alias", identifier, "message", "call", "response" or "rpc"
> make: *** [x86_64/include/if/bdis_defs.h] Error 1
> 
> the mentioned "t" is the first letter t of the keyword "typedef"
> 
> 
> 
> Removing the typedef will result in the following error:
> 
> ./tools/bin/flounder -i ../src/if/platform/x86_64.if -i ../src/if/arch/x86_64.if -i
> ../src/if/types.if --generic-header ../src/if/bdis.if
> ./x86_64/include/if/bdis_defs.h
> Parse error at: "../src/if/bdis.if" (line 26, column 39):
> unexpected "["
> expecting letter or digit, "," or ")"
> 
> Again the mentioned "[" is the first bracket of the argument array.
> 
> It is like both typedef and array arguments are not supported by the version
> of flounder in the PUBLIC repository, which is the one I'm using.
> 
> However, the docs say exactly the opposite if you take a look at TN-011-
> IDC.pdf pages 6 to 8.
> 
> I hope we can find a solution, cause I'm at a standstill because of this.
> 
> regards,
> Georgios Varisteas
> 
> ________________________________________
> From: Baumann  Andrew [andrewb at inf.ethz.ch]
> Sent: Wednesday, November 02, 2011 17:23
> To: Georgios Varisteas; barrelfish-users at lists.inf.ethz.ch
> Subject: RE: Interface types
> 
> Hi Georgios,
> 
> I'm not sure what you're trying to do here. Could you also send the relevant
> parts of bdis.if?
> 
> Andrew
> 
> > -----Original Message-----
> > From: Georgios Varisteas [mailto:yorgos at kth.se]
> > Sent: Wednesday, 2 November 2011 13:58
> > To: barrelfish-users at lists.inf.ethz.ch
> > Subject: [Barrelfish-users] Interface types
> >
> > Hi,
> >
> > I'm trying to create an interface (*.if) file and it seems that the
> > documentation is contrasting the version of flounder in the repository.
> > Specifically I get error messages like the following when I try to use typedef
> > and arrays:
> >
> > ./tools/bin/flounder -i ../src/if/platform/x86_64.if -i ../src/if/arch/x86_64.if
> -i
> > ../src/if/types.if --generic-header ../src/if/bdis.if
> > ./x86_64/include/if/bdis_defs.h
> > Parse error at: "../src/if/bdis.if" (line 26, column 39):
> > unexpected "["
> > expecting letter or digit, "," or ")"
> >
> > ./tools/bin/flounder -i ../src/if/platform/x86_64.if -i ../src/if/arch/x86_64.if
> -i
> > ../src/if/types.if --generic-header ../src/if/bdis.if
> > ./x86_64/include/if/bdis_defs.h
> > Parse error at: "../src/if/bdis.if" (line 11, column 9):
> > unexpected "t"
> > expecting "alias", identifier, "message", "call", "response" or "rpc"
> > make: *** [x86_64/include/if/bdis_defs.h] Error 1
> >
> > I really need to have some complex types in the messages, so how can I fix
> > this?
> >
> > cheers,
> > Georgios Varisteas
> > _______________________________________________
> > Barrelfish-users mailing list
> > Barrelfish-users at lists.inf.ethz.ch
> > https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users



More information about the Barrelfish-users mailing list