Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (G)
Guardian Procedure Calls Reference Manual—522629-013
6-6
GETCRTPID Procedure
(Superseded by PROCESS_GETINFOLIST_
process-id output
INT:ref:4
is the 4-word array where GETCRTPID returns the CRTPID (or process ID) of the
process specified by
cpu,pin. The process-id is returned in local form, that is,
[0:2] Process name or creation timestamp
[3].<0:3>
Reserved
.<4:7>
processor number where the process is executing
.<8:15>
PIN assigned by the operating system to identify the process in the
processor
Condition Code Settings
< (CCL) indicates that GETCRTPID failed, or that no such process exists, or that
the process exists but it is terminating.
= (CCE) indicates that GETCRTPID completed successfully.
> (CCG) does not return from GETCRTPID.
Considerations
•
Passing the process ID to OPEN
The process ID returned from GETCRTPID is suitable for passing directly to the
file-system OPEN procedure (if expanded to 12 words and blank-filled on the
right).
•
An application acquiring its own process ID
An application that is running at a low PIN can acquire its own
process-id by
passing the results of the MYPID procedure to the GETCRTPID procedure:
CALL GETCRTPID ( MYPID, MY^PROCESSID );
The PID of a process is NOT shorthand for the process ID. It is a term for the
cpu,pin for a process.
•
High-PIN processes
You cannot use GETCRTPID for high-PIN processes because a high PIN cannot fit
into
cpu,pin or process-id.
Example
CALL GETCRTPID ( PID , PROCESS^ID );