minor fixups pre tcp<->spec coordination
[unix-history] / usr / src / sys / vax / include / pcb.h
index e56bf15..9c4264d 100644 (file)
@@ -1,11 +1,7 @@
-/*     pcb.h   3.1     %H%     */
+/*     pcb.h   4.5     81/05/14        */
 
 /*
  * VAX process control block
 
 /*
  * VAX process control block
- *
- * THE SIZE OF THE pcb, AS INFLUENCED BY THE SIZE OF THE SOFTWARE
- * EXTENSION, IS KNOWN IN THE #ifdef FASTVAX'ed DEFINITIONS OF THE
- * OFFSETS OF U_ARG and U_QSAV IN THE FILE user.h.
  */
 
 struct pcb
  */
 
 struct pcb
@@ -27,7 +23,9 @@ struct pcb
        int     pcb_r10; 
        int     pcb_r11; 
        int     pcb_r12; 
        int     pcb_r10; 
        int     pcb_r11; 
        int     pcb_r12; 
+#define        pcb_ap pcb_r12
        int     pcb_r13; 
        int     pcb_r13; 
+#define        pcb_fp pcb_r13
        int     pcb_pc;         /* program counter */
        int     pcb_psl;        /* program status longword */
        struct  pte *pcb_p0br;  /* seg 0 base register */
        int     pcb_pc;         /* program counter */
        int     pcb_psl;        /* program status longword */
        struct  pte *pcb_p0br;  /* seg 0 base register */
@@ -42,3 +40,23 @@ struct pcb
        int     *pcb_sswap;
        int     pcb_sigc[3];
 };
        int     *pcb_sswap;
        int     pcb_sigc[3];
 };
+
+#define        AST_NONE        0x04000000      /* ast level */
+#define        AST_USER        0x03000000      /* ast for user mode */
+
+#define        ASTLVL_NONE     4
+#define        ASTLVL_USER     3
+
+#define        AST_CLR         0x07000000
+
+#define        aston() \
+       { \
+               u.u_pcb.pcb_p0lr = (u.u_pcb.pcb_p0lr &~ AST_CLR) | AST_USER; \
+               mtpr(ASTLVL, ASTLVL_USER); \
+       }
+
+#define        astoff() \
+       { \
+               u.u_pcb.pcb_p0lr = (u.u_pcb.pcb_p0lr &~ AST_CLR) | AST_NONE; \
+               mtpr(ASTLVL, ASTLVL_NONE); \
+       }