/*static char *SCCSID = "@(#)proc.h     6.1 90/11/17";*/
/*      SCCSID = @(#)proc.inc   13.6 90/07/10 */

//
//      PROC.H - Process Definitions
//


//      Procblock/Procrun return codes
//
//      Processes can be woken for three reasons:
//              1) someone calls ProcRun appropriately
//              2) a timed block runs out of time
//              3) the block is interruptable and a signal came in.
//
//      These symbols are used by Procblock to set the proper
//      return values.  Note that the values are "magic" to allow
//      us to save code; study Procblock before changing.

#define PBR_NA  0                       // normal awakening, must be 0
#define PBR_TE  1                       // timer exhausted
#define PBR_IN  3                       // sleep interrupted

//      Add procblock return code for PM Event Posted
#define PBR_PM  5
#define PM_EVENT_POSTED 3000

//      Process constants

#define PID_MIN         1               // Lowest process id
#define PID_MAX         0xFFFF          // Highest process id
#define PID_IDLE        0               // Idle process id

//      Process Status Flags
//
//      These flags are per-process and are kept in the PTDA.  If
//      these bits change, INFOSEG.INC must be updated because
//      ProcStatus is now in the local infoseg.

#define PS_XITLST       0x01            // Doing ExitList Processing
#define PS_XITTH1       0x02            // Exiting thread 1
#define PS_XITALL       0x04            // The whole process is exiting
#define PS_SYNCPARENT   0x10            // Parent cares about termination
#define PS_WAITPARENT   0x20            // Parent did an exec-and-wait
#define PS_DYING        0x40            // Process is dying
#define PS_EMBRYO       0x80            // Process in embryonic state

//      Process Type codes
//
//      These are the definitons for the codes stored
//      in the ProcType field in the PTDA.

#define PT_FULLSCRN     0               // Full screen app.
#define PT_VDM          1               // VDM process
#define PT_REALMODE     PT_VDM          // Real mode process
#define PT_VIOWIN       2               // VIO windowable app.
#define PT_PRESMGR      3               // Presentation Manager app.
#define PT_DETACHED     4               // Detached app.
