Next: Communication Up: C-with-Ease language definition Previous: C-with-Ease language definition

Process control

C-with-Ease provides two forms of process creation:

To faciliate creation of multiple processes there is a replication constuct. In the replication (i @for 10) the variable i is created (local to the process creation statement) and stepped from 0 to 9 with a process created for each value of i. The initial value can be changed from 0 by adding a @from clause, and the step value changed from 1 by adding a @by clause.

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.

The @process declaration must be used for all prototypes of the function and the function definition itself.

A @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 declation void (*func)(void) is inappropriate, as is int hello[10].

C++ -with-Ease differences:

@process declarations change a function's parameter types. See the C++ section for more information.

Next: Communication Up: C-with-Ease language definition Previous: C-with-Ease language definition



Tim MacKenzie <tym@cs.monash.edu.au>
Mon Apr 1 00:27:29 EST 1996