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

/*
COPYRIGHT:  1979, by Ford Aerospace and Communications Corp.
ADDRESS:    Ford Aerospace and Communications Corp.
            Western Development Laboratories
            3939 Fabian Way
            Palo Alto, California 94303
            Attention: Software Technology Dept.
            Mail Stop: V02 

CPCI:   Emulator

TAG:    EKL
MODULE NAME:  

		Kernel Interface Linkage Include file.

REFERENCES-
  A Specs:  ???
  B5 Specs:  ???

HISTORY:
  AUTHOR: Dan Ladermann, modified from Modula version by L.C.Dion, R.B.Neely.
  VERSION:  3.4 of 12/12/82
  MODULE TYPE: M4 include file with C types.

PRIVILEGES:  None
SPECIAL NOTES:  None

*/


/*
 *      CONSTANTS
 */

#define  msg_limit 11          /* top index for bytes in a message     */

#define FALSE 0             /* boolean values */
#define TRUE -1             /* 0377 as used in Kernel */


/* bits for discretionary access  */

#define  ownerRead     0400
#define  ownerWrite    0200
#define  ownerExecute  0100
#define  groupRead      040
#define  groupWrite     020
#define  groupExecute   010
#define  allRead         04
#define  allWrite        02
#define  allExecute      01

/* bits for discretionary access  for acc modes */

#define  ACC_mode_Read     0400
#define  ACC_mode_Write    0200
#define  ACC_mode_Execute  0100


/* K_remap status selectors */

#define  remap_inLoc     01
#define  remap_inAcc     02
#define  remap_outSize   04

/* K_set_segment_status selectors */

#define segset_mem_lock      01
#define segset_mem_advise    02
#define segset_swap_lock     04
#define segset_sharable     010
#define segset_stat_acc     020
#define segset_stat_loc     040

/* K_(set)(get)_process_status selectors */

#define  pstat_family    01            /* privileged to set    */
#define  pstat_owner     02            /* privileged to set    */
#define  pstat_group     04            /* privileged to set    */
#define  pstat_aprio    010            /* owner to set         */
#define  pstat_pseint   020            /* owner to set         */
#define  pstat_ps       040            /* self only to set     */
#define  pstat_alarm   0100            /* owner to set         */
#define  pstat_tt      0200            /* owner to set         */
#define  pstat_clock   0400            /* set time_of_day_clock*/

/* K_set_object_level selectors */

#define  setol_acclev    01            /* set access_level     */
#define  setol_owner     02            /* set effective owner  */
#define  setol_group     04            /* set effective group  */
#define  setol_da       010            /* set discr_access     */
#define  setol_priv     020            /* set privileges       */


/*
 *      TYPES
 *
 *
 *      Each type declaration has two comments associated with it.
 *
 *      1. a short description as to what the type is used for
 *
 *      2. the size of the type ( in bytes of data space )
 *
 *      3. where m4 translates have been used for typedefs there is also
 *         and addition comment -typedef-
 */


#define bits32 long     /* typedef */ /* 32-bit bits */
				      /* 4 bytes */

#define cardinal32 long /* typedef */ /* 32-bit cardinal */
				      /* 4 bytes */

#define cardinal unsigned int /* typedef */ /* 32-bit cardinal */
				      /* 2 bytes */

#define selector int    /* typedef */ /* status selector */
				      /* 2 bytes */

#define boolean char    /* typedef */ /* TRUE or FALSE */
				      /* 1 byte */

#define Boolean char    /* typedef */ /* TRUE or FALSE */
				      /* 1 byte */




/*
 *      nsp_type  - name space partition
 */

#define nsp_type char	/* 1 byte */


	/*
	 *      The file_nsp has been removed. If cardinal( seid.nsp )
	 *              is greater than 127, then the namespace signifies
	 *              the file namespace (by definition).
	 */


#define  null_nsp       0   /* null                 */
#define  extent_nsp    01   /* EXTENTS              */
#define  terminal_nsp  02   /* TERMINALS            */
#define  device_nsp    03   /* DEVICES              */
#define  process_nsp   04   /* PROCESSES            */
#define  segment_nsp   05   /* SEGMENTS             */
#define  subtype_nsp   06   /* SUBTYPES             */
#define  kernel_nsp    07   /* Kernel gen. messages */
#define  same_nsp    0200   /* UNIX directories     */
#define  root_nsp    0201   /* ROOT directory nsp   */
#define  low_file_nsp  0201  /* mounted file systme  */
#define  hign_file_nsp 0377  /* mounted file system  */

/*
 *       seid   -     SEID
 */

#define seid long	/* 4 bytes */
#define SEID long	/* 4 bytes */

	struct  {
		nsp_type  nsp;          /* name space   */
		char      uniq_id0;     /* unique ID    */
		int       uniq_id1;     /* unique ID    */
	};

	/*
	 *      Seids can be move, compared for
	 *      equality and passed as longs. But
	 *      should be accessed using the
	 *      above structure and the following
	 *      macro(s).
	 */

	/* usage namespace(seid)- returns the name space portion of the seid */
	/* where seid is a long.                                             */

#define namespace(x), ((int)(x.nsp) & 0377) 

#define asyncId int  /* ID for asynchronous I/O */
			/* 2 bytes */

/*
 *      acc_mode        Access Modes
 */

#define acc_mode int /* access mode bit mask */
				/* 2 bytes */


/*
 *      compartments
 */
#define  SYSTEM                 01L
#define  compart_1              02L
#define  compart_2              04L
#define  compart_3             010L
#define  compart_4             020L
#define  compart_5             040L
#define  compart_6            0100L
#define  compart_7            0200L
#define  compart_8            0400L
#define  compart_9           01000L
#define  compart_10          02000L
#define  compart_11          04000L
#define  compart_12         010000L
#define  compart_13         020000L
#define  compart_14         040000L
#define  compart_15        0100000L
#define  compart_16        0200000L
#define  compart_17        0400000L
#define  compart_18       01000000L
#define  compart_19       02000000L
#define  compart_20       04000000L
#define  compart_21      010000000L
#define  compart_22      020000000L
#define  compart_23      040000000L
#define  compart_24     0100000000L
#define  compart_25     0200000000L
#define  compart_26     0400000000L
#define  compart_27    01000000000L
#define  compart_28    02000000000L
#define  compart_29    04000000000L
#define  compart_30   010000000000L
#define  compart_31   020000000000L

#define  compart_set  bits32   /* typedef */
				       /* 4 bytes */

/*
 *      direction       = (up,down)     (* segment growth direction     *)
 */
#define  direction  boolean /* typedef */
				       /* 1 byte   */
#define  up  FALSE
#define  down  TRUE

/*
 *      discr_access - Discretionary access
 */

#define  discr_access  int  /* typedef */
				    /* 2 bytes */

/*
 *      domain_type  -  domains
 */

#define  domain_type  char      /* typedef */
					/* 1 byte */

#define  null_domain             0       /* domains */
#define  kernel_domain          01
#define  supervisor_domain      02
#define  user_domain            03

#define  fBlockNumber  long   /* typedef */   /* block number in files */
			/* 4 bytes */

/*
 *       file_stat_block = RECORD               file status
 */                       /* 14 bytes */

#define  file_stat_block fStatBl
#define  time_last_mod TLstMod
#define  open_at_crash OpenACr

	typedef struct  {
			cardinal32    f_size;           /* file size    */
			seid          subtype;          /* file subtype */
			cardinal32    time_last_mod;    /* time of last mod */
			boolean       open_at_crash;    /* if open at crash */
		} file_stat_block;

/*
 *      integrity categories
 */

#define  integrity_cat_type char  /*typedef */
					  /* 1 byte */

#define  integrity_cat_0              00
#define  integrity_cat_1              01
#define  integrity_cat_2              02
#define  integrity_cat_3              03
#define  integrity_cat_4              04
#define  integrity_cat_5              05
#define  integrity_cat_6              06
#define  integrity_cat_7              07
#define  integrity_cat_8             010
#define  integrity_cat_9             011
#define  integrity_cat_10            012
#define  integrity_cat_11            013
#define  integrity_cat_12            014
#define  integrity_cat_13            015
#define  integrity_cat_14            016
#define  integrity_cat_15            017

/*
 *      ioFunction - device functions
 */

#define  ioFunction  char  /* typedef */
				   /* 1 byte */
#define  READ                00
#define  WRITE               01
#define  SETEOMCHARS         02
#define  REWIND              03
#define  UNLOAD              04
#define  WRITEMARK           05
#define  SETDENSITY          06
#define  SETTERMMODES1       07
#define  SETTERMMODES2      010
#define  GETTERMMODES       011
#define  SETFILESIZE        012
#define  ERASEFILE          013
#define  VOLUMEVALID        014
#define  VOLUMEINVALID      015
#define  INPUTWAIT          016
#define  SETPATH            017

/*
 *      definitions for devices.
 */

#define  break_on_all_characters              01
#define  suppress_echo                        02
#define  suppress_echo_of_break_character     04


/*
 *      msg_struct       = message portion of IPC
 */
#define  msg_struct  msgStr

	typedef char    msg_struct[msg_limit + 1];     /* message */
				/* 12 bytes */

/*
 *      ipc_block       = RECORD    -  IPC message
 */

#define ipc_block ipcBlk
#define ipc_seid ipcSeid

	typedef struct  {       /* 16 bytes */
			seid            ipc_seid;       /* SEID of sender */
			msg_struct      ipc_msg;        /* message data   */
		}ipc_block;

/*
 *      K_err_num -        Kernel error values
 */

#define  K_err_num  int        /* typedef */
					/* 2 byte */
#define tempx 0   /* temp variable used for filling out err_nums */
#define incv `define(`$1',incr($1))' `$1')
#define  XOK                     tempx
#define  XfcaBadBlockNo         incv(`tempx')
#define  XfcaBadDa              incv(`tempx')
#define  XfcaBadDa1             incv(`tempx')
#define  XfcaBadDa2             incv(`tempx')
#define  XfcaBadDevice          incv(`tempx')
#define  XfcaBadNsp             incv(`tempx')
#define  XfcaBadOd              incv(`tempx')
#define  XfcaBadPriv            incv(`tempx')
#define  XfcaBadRefCount        incv(`tempx')
#define  XfcaBadRequest         incv(`tempx')
#define  XfcaBadSize            incv(`tempx')
#define  XfcaBadStCap           incv(`tempx')
#define  XfcaBadSubtype         incv(`tempx')
#define  XfcaBadSubtypeMatch    incv(`tempx')
#define  XfcaBadType            incv(`tempx')
#define  XfcaBadpriv            incv(`tempx')
#define  XfcaChangeLink         incv(`tempx')
#define  XfcaCritExcl           incv(`tempx')
#define  XfcaDapViol            incv(`tempx')
#define  XfcaDevNotWritable     incv(`tempx')
#define  XfcaDevOpen            incv(`tempx')
#define  XfcaEndOfFile          incv(`tempx')
#define  XfcaFileOpen           incv(`tempx')
#define  XfcaInUse              incv(`tempx')
#define  XfcaNoDev              incv(`tempx')
#define  XfcaNoDevice           incv(`tempx')
#define  XfcaNoExclDA           incv(`tempx')
#define  XfcaNoExtent           incv(`tempx')
#define  XfcaNoFile             incv(`tempx')
#define  XfcaNoFile1            incv(`tempx')
#define  XfcaNoFile2            incv(`tempx')
#define  XfcaNoLeaf             incv(`tempx')
#define  XfcaNoOwner            incv(`tempx')
#define  XfcaNoPriv             incv(`tempx')
#define  XfcaNoStCap            incv(`tempx')
#define  XfcaNoWriteDa          incv(`tempx')
#define  XfcaNotFile            incv(`tempx')
#define  XfcaNotReadable        incv(`tempx')
#define  XfcaNotTerminal        incv(`tempx')
#define  XfcaNotThere           incv(`tempx')
#define  XfcaNotWritable        incv(`tempx')
#define  XfcaOdSpace            incv(`tempx')
#define  XfcaOpenFiles          incv(`tempx')
#define  XfcaOverflow           incv(`tempx')
#define  XfcaReadOnly           incv(`tempx')
#define  XfcaSTNotWritable      incv(`tempx')
#define  XfcaTermLocked         incv(`tempx')
#define  XfmiExclusiveFile      incv(`tempx')
#define  XlevFilEx              incv(`tempx')
#define  XlevSegEx              incv(`tempx')
#define  XnoSeg                 incv(`tempx')
#define  XproBadSlot            incv(`tempx')
#define  XproIpcOverflow        incv(`tempx')
#define  XproNoAccess           incv(`tempx')
#define  XproNoPriv             incv(`tempx')
#define  XproNoProcess          incv(`tempx')
#define  XproNoReceiver         incv(`tempx')
#define  XproNoRelease          incv(`tempx')
#define  XproTooManyProcesses   incv(`tempx')
#define  XproUninterruptable    incv(`tempx')
#define  XpvmArgNotWritable     incv(`tempx')
#define  XpvmArgOverflow        incv(`tempx')
#define  XpvmArgSharable        incv(`tempx')
#define  XpvmBadDa              incv(`tempx')
#define  XpvmBadGrowth          incv(`tempx')
#define  XpvmBadSeg             incv(`tempx')
#define  XpvmDupSeg             incv(`tempx')
#define  XpvmExecute            incv(`tempx')
#define  XpvmImmOverflow        incv(`tempx')
#define  XpvmNoArg              incv(`tempx')
#define  XpvmNoDa               incv(`tempx')
#define  XpvmNoDes              incv(`tempx')
#define  XpvmNoHole             incv(`tempx')
#define  XpvmNoSeg              incv(`tempx')
#define  XpvmNoStick            incv(`tempx')
#define  XpvmNoSuchSeg          incv(`tempx')
#define  XpvmNoSwap             incv(`tempx')
#define  XpvmNotReadable        incv(`tempx')
#define  XpvmNotWritable        incv(`tempx')
#define  XpvmRemap1             incv(`tempx')
#define  XpvmRemap2             incv(`tempx')
#define  XpvmSharable           incv(`tempx')
#define  XpvmSpace              incv(`tempx')
#define  XpvmVecTooLong         incv(`tempx')
#define  XpvmWriteOnly          incv(`tempx')
#define  XsegBadMode            incv(`tempx')
#define  XsegBadName            incv(`tempx')
#define  XsegBadSize            incv(`tempx')
#define  XsegNotHeld            incv(`tempx')
#define  XsegNotNull            incv(`tempx')
#define  XsegSticky             incv(`tempx')
#define  XsegSwappable          incv(`tempx')
#define  XsylTooHigh            incv(`tempx')
#define  XtiiNoObj              incv(`tempx')
#define  XtiiNoSetPriv          incv(`tempx')

/*
 *      ioStatus - I/O status of operation
 */

#define  ioStatus long    /* typedef */
				   /* 4 bytes */
#define devIndep devIdep
	struct  {                     /* structure for accessing ioStatus */
		K_err_num       devIndep;     /* independent part */
		int             devDep  ;     /* dependent part   */
	};

/*
 *      ioc_block - struct of I/O completion message
 */

	typedef struct {
		seid            ioc_seid;
		char            ioc_type;
		char            ioc_x1;
		ioStatus        ioc_stat;
		unsigned int    ioc_bytes;
		asyncId         ioc_async;
		char            ioc_x2[2];
	} ioc_block;

/*
 *      mem_type - memory space divisions
 */

#define  mem_type char  /* typedef */   /* memory space divisions */
				/* 1 byte  */
#define null_space 0
#define d_space    1
#define i_space    2

#define  openDescriptor int      /* typedef */  /* open file handle */
				  /* 2 bytes */
/*
 *     KopenModes - open modes
 */

	/* open modes as used by Kernel
	 *      openModes = RECORD
	 *                (* 4 bytes *)
	 *                        read            : boolean;
	 *                        write           : boolean;
	 *                        exclusive_read  : boolean;
	 *                        exclusive_write : boolean
	 *                  END;
	 */
#define KopenModes  long         /* typedef */

	/* structure for geting at  KopenModes */
	struct {
		char    KomRead;
		char    KomWrite;
		char    KomEread;
		char    KomEwrite;
	};


	/* open  modes used by the emulator - packed in char  */

#define open_mode char         /* typedef */

#define  om_read   01      /* bit masks for open Modes */
#define  om_write  02
#define  om_exclusive_read 04
#define  om_exclusive_write 010

	/*
	 * m4 macro used for converting packed character of open modes
	 * into two arguments of kernel open mode type.  Used in Kernel calls
	 */

#define unpack_om(x),  ((x&om_read)|(x&om_write)<<7)  `,'  ((x&om_exclusive_read)>>2)|((&om_exclusive_write)<<5))       
/*
 * virt_addr, virt_loc - virtual address and location
 */

#define  virt_addr int  /* virtual address */
				/* 2 bytes */

#define  virt_loc long  /* virtual location */
				/* 4 bytes */

	/* structure definition used for accessing virt_loc */
	struct  {
		domain_type     domain;         /* char */
		mem_type        space;          /* char */
		virt_addr       address;        /* int  */
	};

	/* macros for getting domain and space from long that handles sign extention*/
#define get_domain, ((int)(x.domain) & 0377)
#define get_space,  ((int)(x.space)  & 0377)

/*
 *      p_block - parameter block
 */


	typedef struct {        /* parameter block */
				/* 6 bytes */
			virt_loc        location;       /* block address   */
			int             b_size  ;       /* block size      */
		}  p_block;

/*
 *      priv_names - privileges
 */

#define  priv_struct bits32  /* typedef */     /* set of privileges */
				      /* 4 bytes */

#define  privFileUpdateStatus               01L   /* names of privileges */
#define  privLink                           02L
#define  privLockSeg                        04L
#define  privModifyPriv                    010L
#define  privMount                         020L
#define  privSetLevel                      040L
#define  privStickySeg                    0100L
#define  privSetPath                      0200L
#define  privViolSimpSecurity             0400L
#define  privViolStarSecurity            01000L
#define  privViolSimpIntegrity           02000L
#define  privViolStarIntegrity           04000L
#define  privViolDiscrAccess            010000L
#define  privRealizeExecPermission      020000L
#define  privSignal                     040000L
#define  privWalkPTable                0100000L
#define  privHalt                      0200000L
#define  privKernelCall                0400000L
#define  privViolCompartments         01000000L
#define  privSetComm                  02000000L
#define  privImmigrate                04000000L

/*
 *      proc_stat_block - process status block
 */

#define  proc_stat_block PstatBl

	typedef struct  {                       /* process status block     */
					/* 32 bytes */
			seid            own;    /* own seid -- read-only    */
			seid            parent; /* parent seid -- read-only */
			int             family; /* process family name      */

			int             owner;  /* real owner id --read-only*/
			int             group;  /* real group id --read-only*/

			int             aprio;  /* advisory priority        */
			int             pseint; /* pseudo-interrupt level   */
			int             ps;     /* processor status         */

			int             alarm;  /* real-time timer alarm    */
			cardinal32      clock;  /* time of day clock        */
			boolean         tt;     /* timer toggle enable      */

			int             stiming;/* supv timings - read-only */
			int             utiming;/* user timings - read-only */
		} proc_stat_block;

/*
 *      pseudo_int_levels  - pseudo interrupt levels
 */

#define PI_ADDRESS 32  /* starting address of pseduo int vectors */

#define  pseudo_int_levels int   /* typedef */
					  /* 2 byte */
#define base_lev    0   /* emulator */
#define ipc_lev     1   /* IPC      */
#define time_lev    2   /* timer    */
#define sig_lev     3   /* K_signal */
#define io_lev      4   /* I/O      */
#define hard_lev    5   /* hardware */

/*
 *      pseudo_int_vector    -- pseudo-interrupt vector
 */
#define pseudo_int_vector PIvec
#define interrupted_pc intPc
#define interrupted_ps intPs
#define interrupted_p_level intPlev

	typedef struct  {
				/* 26 bytes */
			int             interrupted_pc;
			int             interrupted_ps;
			int             interrupted_p_level;
			ipc_block       int_msg;
			int             new_pc;
			int             new_ps;
		} pseudo_int_vector;


#define pseudo_int_vectors PIvecs

	typedef pseudo_int_vector pseudo_int_vectors[hard_lev + 1] ;


/*
 *      security_cat_type - security categories
 */

#define  security_cat_type char  /*typedef */
					  /* 1 byte */

#define  security_cat_0             00
#define  security_cat_1             01
#define  security_cat_2             02
#define  security_cat_3             03
#define  security_cat_4             04
#define  security_cat_5             05
#define  security_cat_6             06
#define  security_cat_7             07
#define  security_cat_8            010
#define  security_cat_9            011
#define  security_cat_10           012
#define  security_cat_11           013
#define  security_cat_12           014
#define  security_cat_13           015
#define  security_cat_14           016
#define  security_cat_15           017

#define  seg_des int    /* typedef */           /* open segment handle */
			/* 2 bytes */

#define  seg_size int   /* typedef */           /* size of segments */
			/* 2 bytes */

/*
 *      seg_stat_block  -- segment status block
 */

#define seg_stat_block segStBl
#define mem_lock memLock
#define mem_advise memAdv
#define swap_lock swapLk
#define executable execabl
#define sharable sharabl
#define stat_size statSiz
#define stat_seid statSed
#define stat_des statDes
#define stat_mapped statMap
#define stat_acc statAcc
#define stat_loc statLoc

	/* entries marked K_build only can be set by K_build  */

	typedef struct {
				/* 22 bytes */
			boolean            mem_lock;       /* in mem       */
			boolean            mem_advise;     /* I/O          */
			boolean            swap_lock;      /* sticky       */
			boolean            sharable;       /* sharable     */
			direction          growth;         /* K_build only */
			seg_size           stat_size;      /* K_build only */
			seid               stat_seid;      /* read only    */
			seg_des            stat_des;       /* read only    */
			boolean            stat_mapped;    /* read only    */
			acc_mode           stat_acc;       /* K_build only */
			virt_loc           stat_loc;       /* K_build only */
		} seg_stat_block;


/*
 *      access_level_type
 */

#define access_level_type accLevT
#define security_category secCat
#define integrity_category intgCat
#define security_compart secComp

	typedef struct  {
					/* 6 bytes */
			security_cat_type              security_category;
			integrity_cat_type             integrity_category;
			compart_set                    security_compart;
		} access_level_type;

/*
 *      tii_struct
 */

#define tii_struct tiiStru
#define access_level accLev
#define tii_priv tiiPriv
#define tii_owner tiiOwn
#define tii_group tiiGrp

	typedef struct  {
				/* 16 bytes */
			access_level_type       access_level;
			int                     tii_owner;
			int                     tii_group;
			discr_access            da;
			priv_struct             tii_priv;
		} tii_struct;



/* CONST   Typed constants */

#define  null_open_descriptor  -1

#define  null_seg_des  -1

#define  null_seid  0L                  /* all zero's */

#define  null_acc_mode  0L              /* all false  */

#define  null_priv_struct  0L              /* all zero's */

#define  null_virt_loc  0L              /* null_domain, null_space, 0 */

/* null structures (from Modula) - no C mapping  */
/*
 *      null_p_block         = p_block( virt_loc( null_domain,
 *                                                null_space, 0 ), 0 );
 *
 *      null_tii_struct       = tii_struct(
 *                                  access_level_type(
 *                                      security_cat_0,
 *                                      integrity_cat_0,
 *                                      bits32( [], [] )
 *                                  ),
 *                                  0,0,[],bits32([],[])
 *                              );
 *      null_file_stat_block  = file_stat_block(
 *                                  cardinal32( 0, 0 ),
 *                                  seid( null_nsp, 0C, 0 ),
 *                                  cardinal32( 0, 0 ),
 *                                  false
 *                              );
 *      null_proc_stat_block  = proc_stat_block(
 *                                  seid( null_nsp, 0C, 0 ),
 *                                  seid( null_nsp, 0C, 0 ),
 *                                  0,0,0,0,0,0,
 *                                  0,cardinal32( 0, 0 ),false,
 *                                  0,0
 *                              );
 *      null_seg_stat_block   = seg_stat_block(
 *                                  false,false,false,false,up,
 *                                  0,
 *                                  acc_mode( false, false, false ),
 *                                  virt_loc( null_domain, null_space, 0 )
 *                              );
 */

/* long to short name mapping for Kernel calls */

#define  K_build_segment           Kbldseg
#define  K_close                   Kclose
#define  K_create                  Kcreate
#define  K_device_function         Kdevfun
#define  K_fork                    Kfork
#define  K_get_file_status         Kgetfs
#define  K_get_object_level        Kgetol
#define  K_get_process_status      Kgetps
#define  K_get_segment_status      Kgetss
#define  K_halt                    Khalt
#define  K_interrupt_return        Kintret
#define  K_invoke                  Kinvoke
#define  K_link                    Klink
#define  K_mount                   Kmount
#define  K_nap                     Knap
#define  K_open                    Kopen
#define  K_post                    Kpost
#define  K_read_block              Kread
#define  K_receive                 Kreceive
#define  K_release_process         Krelproc
#define  K_release_segment         Krelseg
#define  K_remap                   Kremap
#define  K_rendezvous_segment      Krndzvs
#define  K_secure_terminal_lock    Ktrmlock
#define  K_set_file_status         Ksetfs
#define  K_set_object_level        Ksetol
#define  K_set_process_status      Ksetps
#define  K_set_segment_status      Ksetss
#define  K_signal                  Ksignal
#define  K_spawn                   Kspawn
#define  K_unlink                  Kunlink
#define  K_unmount                 Kumount
#define  K_walk_process_table      Kwkpctab
#define  K_write_block             Kwrite
#define  K_set_pil                 Ksetpil
#define  K_set_da                  Ksetda
#define  K_set_priv                Ksetpriv
#define  K_set_real_id             Ksetrid
/* K_boot not implemented in emulator interface */
#define  K_boot                    Kboot
#define  K_lock                    Klock
#define  K_unlock                  Kunlock
