C++-with-Ease provides two forms of process creation:
To faciliate creation of multiple processes there is a replication
constuct. In the replication
Functions used in process creation statements are void functions and must be declared as process functions. This is acheived by replacing the void return type with @process in either a definition or declaration of the function.
In C++ -with-Ease , parameters for functions declared with @process must not be reference parameters, as the function may not be executing in the same address space.
To allow for passing of arbitrary parameter types, C++ -with-Ease marshalls data passed between processes (including process function parameters). See section 3.3 for more information.
The @process declaration must be used for all prototypes of the function and the function definition itself.Next: Communication Up: C++-with-Ease language definition Previous: C++-with-Ease language definitionA @process declaration should occur before any process creation statements which use it. This ensures that an appropriate function declaration is available.
The code generation requires that parameters of @process functions take the form
type identifer , i.e. that nothing follows the name of the parameter and that a parameter name is present. Thus a parameter declationvoid (*func)(void) is inappropriate, as isint hello[10] .In C++ -with-Ease , if a function is declared or defined apart from its @process declaration or definition, then all its parameters should be declared as references. This is because the function definition emitted by the @process directive converts parameters to references to avoid excess copying of data.