date and time created 88/12/14 15:30:11 by sklower
[unix-history] / usr / src / sys / kern / sys_process.c
index baa9a86..15a5778 100644 (file)
@@ -3,9 +3,10 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)sys_process.c       7.1 (Berkeley) %G%
+ *     @(#)sys_process.c       7.4 (Berkeley) %G%
  */
 
  */
 
+#define IPCREG
 #include "../machine/reg.h"
 #include "../machine/psl.h"
 #include "../machine/pte.h"
 #include "../machine/reg.h"
 #include "../machine/psl.h"
 #include "../machine/pte.h"
@@ -86,12 +87,6 @@ ptrace()
        wakeup((caddr_t)&ipc);
 }
 
        wakeup((caddr_t)&ipc);
 }
 
-#if defined(vax)
-#define        NIPCREG 16
-int ipcreg[NIPCREG] =
-       {R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,AP,FP,SP,PC};
-#endif
-
 #define        PHYSOFF(p, o) \
        ((physadr)(p)+((o)/sizeof(((physadr)0)->r[0])))
 
 #define        PHYSOFF(p, o) \
        ((physadr)(p)+((o)/sizeof(((physadr)0)->r[0])))
 
@@ -151,8 +146,17 @@ procxmt()
                }
                if (i < 0)
                        goto error;
                }
                if (i < 0)
                        goto error;
-               if (xp)
+#if defined(tahoe)
+               /* make sure the old value is not in cache */
+               ckeyrelease(u.u_procp->p_ckey);
+               u.u_procp->p_ckey = getcodekey();
+#endif
+               if (xp) {
                        xp->x_flag |= XWRIT;
                        xp->x_flag |= XWRIT;
+#if defined(tahoe)
+                       xp->x_ckey = u.u_procp->p_ckey;
+#endif
+               }
                break;
 
        case PT_WRITE_D:                /* write the child's data space */
                break;
 
        case PT_WRITE_D:                /* write the child's data space */
@@ -170,6 +174,10 @@ procxmt()
                if (p == &u.u_ar0[PS]) {
                        ipc.ip_data |= PSL_USERSET;
                        ipc.ip_data &=  ~PSL_USERCLR;
                if (p == &u.u_ar0[PS]) {
                        ipc.ip_data |= PSL_USERSET;
                        ipc.ip_data &=  ~PSL_USERCLR;
+#ifdef PSL_CM_CLR
+                       if (ipc.ip_data & PSL_CM)
+                               ipc.ip_data &= ~PSL_CM_CLR;
+#endif
                        goto ok;
                }
                goto error;
                        goto ok;
                }
                goto error;