next up previous top
Next: InstFormals
Up: Property
Previous: InitActuals

InitRoutine

Description

The InitRoutine property is used to further specify a Process or SchedProcess component. It is typically used to specify an instantiation of such a component, but it can also be used to specify a definition.

The InitRoutine property is used to specify the entrypoint (i.e., name) of a parameterless function, supplied in the code of the implementation, that will perform application-specific initialization in a process or schedulable process before control is handed from the "main" program to the function(s) implementing the process itself. The UniCon compiler will generate the code to call this routine at the appropriate time before control is handed to the function(s) implementing the process.

If this property is present, a parameterless function call will be generated in the implementation. If no corresponding function definition is supplied, the system construction will fail.

Property Lists

The InitRoutine property can legally be specified in the property list in the following
UniCon language elements:

Value Syntax

The syntax of the value part of the InitRoutine property is a single <identifier> or "string", enclosed in parentheses. The case of the letters can be upper, lower, or mixed.

Required Rule

Optional

There is no default value for the InitRoutine property.

Merge Rule

REPLACE

Subsequent specifications of the InitRoutine property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses).

Semantic Checks

All source files implementing the Process or SchedProcess component are scanned for a C language function definition of the name specified in the InitRoutine property. Case is significant in this check. If the name is not found, an error is reported to the system designer.

If an InitRoutine property is specified, but none of the files implementing the component are source files, then the check is abandoned. In this case, the UniCon compiler will attempt to build the executable for the process, but no guarantees are made about the viability of such an executable at run-time.

Example

The following is an example of a specification of an InitRoutine property. It is embedded in the instantiation of a client SchedProcess component in some real-time system:

  USES Client INTERFACE RT_Client
    PRIORITY (10)
    ENTRYPOINT (client)
    INITROUTINE (initialize_client)
  END Client

next up previous top
Next: InstFormals
Up: Property
Previous: InitActuals

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996