Guardian Procedure Calls Reference Manual

Entry point bit<4>
Variable bit<5>
Extensible bit<6>
PEP number<7:15>
pin
input
INT:value
specifies that p-reg and stack-env see the process identified by pin rather than the calling
process. The pin parameter can be supplied only by privileged callers.
Returned Value
INT
A file-system error code that indicates the outcome of the call:
Successful call; the procedure name is deposited into proc-name for proc-name-length bytes.0
A procedure name was not found. This value is returned if an I/O error occurs during the read of the associated
object file or if p-reg, stackenv, and the optional pin are valid but do not indicate a code location
associated with a procedure (for example, a location in the PEP or XEP).
11
One of the parameters specifies an address that is out of bounds.22
The p-reg, stack-env, and optional pin parameters do not indicate a valid code location.23
The pin parameter was supplied and the caller is not privileged.24
A required parameter was not supplied29
The supplied value of proc-name-size is less than the length of the procedure name that is to be returned
into proc-name. The procedure name (and any other requested output parameters) is returned in
proc-namebut is truncated to the value of proc-name-size.
122
Considerations
The maximum value of proc-name-length, and hence the address space that must be
available at the location given by proc-name, depends on the language that was used to
create the code to which p-reg, stack-env, and the optional pin refer.
Read access to the associated object file is not required in order to obtain the requested output
parameters associated with the given p-reg, stack-env, and optional pin.
Example
INT STACK^ENV = 'L' - 1; ! calling procedures stack
ENV
INT P^REG = 'L' - 2; ! calling procedures P
register
LITERAL PROC^NAME^SIZE = 80;
STRING PROC^NAME ! returned ASCII procedure
name
[ 0:PROC^NAME^SIZE-1 ];
INT LENGTH; ! length of returned proc
name
INT BASE; ! procedure base address
INT OFFSET; ! word offset within
procedure
IF (ERROR := ADDRTOPROCNAME ( P^REG, STACK^ENV, PROC^NAME,
PROC^NAME^SIZE, LENGTH,
BASE ) ) THEN
! an error occurred, ERROR has the error code
56 Guardian Procedure Calls (A-B)