PROC2_$GET_INFO Domain/OS PROC2_$GET_INFO
NAME
proc2_$get_info - get level 2 process information
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/proc2.h>
void proc2_$get_info(
uid_$t &process_uid,
proc2_$info_t *process_info,
pinteger &buffer_length,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/proc2.ins.pas';
procedure proc2_$get_info(
in process_uid: uid_$t;
out process_info: univ proc2_$info_t;
in buffer_length: pinteger;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/proc2.ins.ftn'
integer*4 process_uid(2), status
integer*2 buffer_length, process_info(18)
integer*4 stack_uid(2), stack_base, upc, usp, usb, cpu_total_low
integer*2 state, usr, cpu_total(3), cpu_total_high, priority
equivalence (stack_uid, process_info(1))
equivalence (stack_base, process_info(5))
equivalence (state, process_info(7))
equivalence (usr, process_info(8))
equivalence (upc, process_info(9))
equivalence (usp, process_info(11))
equivalence (usb, process_info(13))
equivalence (cpu_total, process_info(15))
equivalence (priority, process_info(18))
equivalence (cpu_total_high, cpu_total(1))
equivalence (cpu_total_low, cpu_total(2))
call proc2_$get_info(process_uid, process_info, buffer_length, status)
DESCRIPTION
Proc2_$get_info supplies information about the local process specified by
process_uid.
process_uid
The UID of a process.
process_info
Information about the process specified in process_uid. If
process_uid is the UID of the calling process, proc_$get_info sup-
plies only the stack UID and stack base pointer in process_info.
buffer_length
The number of bytes allocated to receive process_info.
Proc2_$get_info will not write more than buffer_length bytes of
information into process_info.
status
The completion status. In addition to status_$ok, proc2_$get_info
can return successfully with a status of proc2_$is_current, indicat-
ing that the UID passed in process_uid is for the calling process
and that, therefore, the only valid information supplied in
process_info is the stack UID and the stack base pointer. If
process_uid does not correspond to a process running on the local
node, proc2_$get_info fails with a status of proc2_$uid_not_found.
NOTES
Proc2_$who_am_i and proc2_$list supply process UIDs.
SEE ALSO
proc1_$cpu_time.