PROC2_$INTRO Domain/OS PROC2_$INTRO
NAME
intro - the Level 2 Process Manager
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/proc2.h>
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/proc2.ins.pas';
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/proc2.ins.ftn'
DESCRIPTION
The proc_$ calls supply information about Level 2 context of processes
running on the local node.
The following is a list of the proc2_$ calls.
proc2_$get_info get level 2 process information
proc2_$list list level 2 process UIDs
proc2_$who_am_i get the UID of the calling process
Data Types
proc2_$info_t
A record type for passing process information. The following
diagram illustrates its format:
15 0
______________________________________________________________
| stack_uid |
|_____________________________________________________________|
| stack_uid |
|_____________________________________________________________|
| stack_uid |
|_____________________________________________________________|
| stack_uid |
|_____________________________________________________________|
| state |
|_____________________________________________________________|
| Not Used |
|_____________________________________________________________|
| usr |
|_____________________________________________________________|
| Not Used |
|_____________________________________________________________|
| upc |
|_____________________________________________________________|
| upc |
|_____________________________________________________________|
| usp |
|_____________________________________________________________|
| usp |
|_____________________________________________________________|
| usb |
|_____________________________________________________________|
| usb |
|_____________________________________________________________|
| cpu_total |
|_____________________________________________________________|
| cpu_total |
|_____________________________________________________________|
| cpu_total |
|_____________________________________________________________|
| Not Used |
|_____________________________________________________________|
| priority |
______________________________________________________________
15 0
stack_uid
The user stack UID.
stack_base
The base address of the user stack.
state
The process state, a value of type proc2_$state_t.
usr The user status register.
upc The user program counter.
usp The user stack pointer.
usb The user stack base pointer.
cpu_total
The cumulative CPU time used.
priority
The process priority.
proc2_$uid_list_t
An array of type uid_$t for passing up to proc1_$n_user_processes
process UIDs.
proc2_$state_t
A set type for describing the state of a user process. It can take
any combination of the following predefined values:
proc2_$waiting
The process is waiting.
proc2_$suspended
The process is suspended.
proc2_$susp_pending
The process suspension is pending.
proc2_$bound
The process is bound.
Errors
proc2_$bad_stack_base
Bad stack base.
proc2_$is_current
The completion status of proc2_$get_info when passed the UID for the
calling process. It does not indicate a failure.
proc2_$not_level_2
The completion status of proc2_$get_info when passed the UID for a
process that is not a user process.
proc2_$uid_not_found
Process not found.