blob: a378f6b70a69bfc93a8994217672ae1b9490e088 [file] [log] [blame] [edit]
/*
* Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import <std_connector.camkes>;
/* Though it is not a practical thing to do, it is possible to specify an
* argument of one of the C primitive types as `refin`. We would still like to
* ensure this works, which is what the following procedure is intended to
* test.
*/
procedure Primitive {
int echo(refin int x);
}
/* The primary use case for `refin` parameters is passing large structs that
* would be awkward to pass by value on the stack. This procedure is intended
* to test that common case.
*/
procedure Complex {
include "my_struct.h";
void echo(refin MyStruct x, out MyStruct y);
}
component Server {
provides Primitive p;
provides Complex c;
}
component Client {
control;
uses Primitive p;
uses Complex c;
}
assembly {
composition {
component Client client;
component Server server;
connection seL4RPCCall conn_primitive(from client.p, to server.p);
connection seL4RPCCall conn_complex(from client.c, to server.c);
}
}