
User’s Manual U14833EJ2V0UM
102
CHAPTER 10 SERVICE CALL MANAGEMENT
10.1 Overview
Service call management is a function used to register functions described by users in the system as service calls.
The registered service calls are known as extended service call routines.
10.2 Extended Service call Routines
User-described functions that are registered in the system as service calls are known as extended service call
routines. Extended service call routines each have a number, or extended function code, that identifies the routine,
the specification of which together with the issuance of the service call (i)cal_svc calls the corresponding routine.
An extended service call routine operates as the extension of the task or handler that issued (i)cal_svc. Therefore,
although standard service calls can be issued from a service call routine, the service calls that can be issued and the
processing after issuance depend on the place (context) where (i)cal_svc was issued. Also, if a task exception
processing request is sent to a task that issued an extended service call routine from interrupt processing that
occurred while the extended service call routine was being executed, because the extended service call routine is
assumed to be task processing, the task exception processing routine will be activated before the extended service
call routine resumes processing.
The description format of an extended service call routine is shown below. Note, however, that the parameter types
and names are defined by the user. In the example below, arg1 corresponds to the (i)cal_svc parameter arg 1.
Example)
ER svcrtn(VW arg1, VW arg2, VW arg3)
{
...
return E_OK;
}
10.2.1 Defining extended service call routines
Extended service call routines are defined and deleted by issuing the service call def_svc. Items such as the
routine’s address and extended function code are specified as the parameters when defining the routine.
10.2.2 Activating and terminating extended service call routines
An extended service call routine is activated by specifying the extended function code and parameters passed to
the service call for (i)cal_svc and then issuing this service call. An extended service call routine is terminated by C
language return or equivalent processing. At this time, an error code corresponding to the processing contents of the
service call is returned as the return value.
When starting an extended service call routine using (i)cal_svc, only up to three parameters can be passed. To
pass four or more parameters, the user must describe an interface library for the extended service call routine. For
describing an interface library for the extended service call routine, refer to
RX4000 (
μ
ITRON4.0) Installation System
Specification
.