# ifndef NO_WHAT
/*
 *      SCCS file type - Emulator Include File
 *
 *      What identification string:
 */
static char *_S_hEP = "@(#)EP.h	3.2";
# endif

/****************************************************************
 *      EP.h contains the defines and declarations              *
 *      for constants in the EP process system.                 *
 *      Variable declarations are found in EPS.c.               *
 ****************************************************************/

/*
 *      CONSTANTS
 */

#define NULL_FProcTab_index  -1

/*
 *      TYPES
 */

/*
 *      Structure for accessing the real and effective uid/gid in the
 *      process table.  Values stored are the 8 bit Unix versions mapped
 *      from the 16 bit KSOS versions by using only the low 8 bits.
 */
struct
{
	char    R_id;   /* real id */
	char    E_id;   /* effective id */
};

/*
 *      t_FProcTab_index
 */

#define t_FProcTab_index  char

typedef struct
{
	SHARED
	Boolean         P_allocated;    /* this entry in use           */
	SEID            procSEID;       /* null seid when not used     */
	int             P_pid;          /* Unix pid - per family       */
	int             P_uid;          /* real and effective          */
	int             P_gid;          /* group id - real & effective */
	t_FProcTab_index
			parent_index;
	SEID            parent_SEID;
	pseudo_int_levels
			P_cur_pil;


	char            P_fill[16];     /* to be removed later     */

	int                             /* flags */
		being_traced            : 1,
		stopped                 : 1,
		parent_waited_once      : 1,
		sforked                 : 1;

} P_entry;

		/* user segment information structure */

typedef struct
{
	SEID            Sseid;          /* segment SEID       */
	seg_des         Sdes;           /* segment descriptor */
	unsigned int    Sadd;           /* segment address    */
	unsigned int    Ssize;          /* segment size       */

} S_entry;



typedef struct
{                       /* Process Local data */
	SEID    working_dir;                    /* current working directory */

	long    child_usr_mode_times;           /* sums of terminated        */
	long    child_supervisor_mode_times;    /* child times               */

	char    LP_fill[12];                    /* to be removed later       */

} Process_local_data;


		/* user process information structure */
typedef struct
{
	int             Umode;  /* 407, 410, 411 - could use other flags */
	S_entry         Utext;  /* user text segment  */
	S_entry         Udata;  /* user data segment  */
	S_entry         Ustk;   /* user stack segment */
} User_image;
