The value of the EntryPoint property is the name of the entrypoint in the implementation that is to receive control at run-time after initialization of the process containing the source code is completed. For example, in UniCon the system designer must implement a Process component as a function or a collection of functions in some programming language (e.g., the C language). UniCon generates the main program that initializes the Process component at run-time and then transfers control to the function specified in the EntryPoint property.
For Computation and Module components, UniCon ignores the EntryPoint property for now. This is because Unix processes generated from Module or Computation components need no additional run-time initialization, and therefore UniCon does not need to produce a main program for them. For these components, the entrypoint is assumed to be "main" for now, since UniCon only handles implementations in the C language to date.
For Process and SchedProcess components, the value of the EntryPoint property has a different set of semantics for client processes and server processes. In UniCon, a process is a client process if it makes remote routine calls and does not export remote routine definitions (services) to be called. A process is a server process if it exports remote routine definitions. Processes not involved in remote procedure calls have the same semantics as client processes.
For client processes, the value of the EntryPoint property must name the function that will get control once the main program generated by the UniCon compiler to initialize the Unix process at run-time finishes its initialization. The name supplied as the entrypoint can be "main," but the UniCon compiler will rename this to some generated name when building the code for the process. This is because the main program it generates to do the initialization must be named "main."
For server processes, the value of the EntryPoint property must name a "worker function" that performs application-specific work not directly related to the task of servicing requests from clients. For server processes, the UniCon compiler generates a "main" program for initialization, and it also generates a function that polls for messages from clients and calls the appropriate functions that provide requested services. This polling function gets control from the "main" program after initialization and does not return. The function named by the value of the EntryPoint property will be invoked to perform work in parallel with the polling function.
In the Mach and Real-Time Mach environments, the worker function is turned into a light-weight process that runs in parallel with the light-weight process that polls for service requests. In these environments, the function must be designed so that it never returns. If it does, then the light-weight process will never be rescheduled to run. In environments that support RPCGen such as SunOS, the function is called periodically from the heavyweight process that polls for the service requests. The worker function is called after each service request, and once every 10 milliseconds when no service requests are made. In this environment, the worker function must be designed to return. If it does not, then the polling function will never regain control and the server will appear to "hang."
The default value for the EntryPoint property for Process and SchedProcess client components is "main." Client also refers to a component that does not make RPCs.
There is no default value for the EntryPoint property for Process and SchedProcess server components.
There is no default value for the EntryPoint property for Module and Computation components.
Subsequent specifications of the EntryPoint property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses).
If an EntryPoint 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.
USES Client INTERFACE RT_Client PRIORITY (10) ENTRYPOINT (client) END Client
Author:
Last Modified: May 12, 1996