get rid of UCBIPC stuff
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 7 Mar 1981 03:38:43 +0000 (19:38 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Sat, 7 Mar 1981 03:38:43 +0000 (19:38 -0800)
SCCS-vsn: sys/kern/kern_synch.c 4.9
SCCS-vsn: sys/kern/kern_proc.c 4.9

usr/src/sys/kern/kern_proc.c
usr/src/sys/kern/kern_synch.c

index 920b9f7..f379b27 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_proc.c     4.8     %G%     */
+/*     kern_proc.c     4.9     %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -395,9 +395,6 @@ setregs()
 {
        register int (**rp)();
        register i;
 {
        register int (**rp)();
        register i;
-#ifdef UCBIPC
-       register struct port *pt;
-#endif UCBIPC
        long sigmask;
 
        for(rp = &u.u_signal[0], sigmask = 1L; rp < &u.u_signal[NSIG];
        long sigmask;
 
        for(rp = &u.u_signal[0], sigmask = 1L; rp < &u.u_signal[NSIG];
@@ -434,21 +431,8 @@ setregs()
        u.u_ar0[PC] = u.u_exdata.ux_entloc + 2; /* skip over entry mask */
        for(i=0; i<NOFILE; i++) {
                if (u.u_pofile[i]&EXCLOSE) {
        u.u_ar0[PC] = u.u_exdata.ux_entloc + 2; /* skip over entry mask */
        for(i=0; i<NOFILE; i++) {
                if (u.u_pofile[i]&EXCLOSE) {
-#ifndef UCBIPC
                        closef(u.u_ofile[i]);
                        u.u_ofile[i] = NULL;
                        closef(u.u_ofile[i]);
                        u.u_ofile[i] = NULL;
-#else UCBIPC
-                       if (u.u_pofile[i]&ISPORT) {
-                               pt = u.u_oport[i];
-                               if (--pt->pt_count == 0)
-                                       ptclose(pt);
-                               u.u_pofile[i] &= ~ISPORT;
-                               u.u_oport[i] = NULL;
-                       } else {
-                               closef(u.u_ofile[i]);
-                               u.u_ofile[i] = NULL;
-                       }
-#endif UCBIPC
                        u.u_pofile[i] &= ~EXCLOSE;
                }
        }
                        u.u_pofile[i] &= ~EXCLOSE;
                }
        }
@@ -485,9 +469,6 @@ exit(rv)
        register int i;
        register struct proc *p, *q;
        register struct file *f;
        register int i;
        register struct proc *p, *q;
        register struct file *f;
-#ifdef UCBIPC
-       register struct port *pt;
-#endif UCBIPC
        register int x;
 
 #ifdef PGINPROF
        register int x;
 
 #ifdef PGINPROF
@@ -526,22 +507,9 @@ exit(rv)
                p->p_flag &= ~SVFDONE;
        }
        for(i=0; i<NOFILE; i++) {
                p->p_flag &= ~SVFDONE;
        }
        for(i=0; i<NOFILE; i++) {
-#ifndef UCBIPC
                f = u.u_ofile[i];
                u.u_ofile[i] = NULL;
                closef(f);
                f = u.u_ofile[i];
                u.u_ofile[i] = NULL;
                closef(f);
-#else UCBIPC
-               if (u.u_pofile[i]&ISPORT) {
-                       pt = u.u_oport[i];
-                       if (--pt->pt_count == 0)
-                               ptclose(pt);
-                       u.u_oport[i] = NULL;
-               } else {
-                       f = u.u_ofile[i];
-                       u.u_ofile[i] = NULL;
-                       closef(f);
-               }
-#endif UCBIPC
        }
        plock(u.u_cdir);
        iput(u.u_cdir);
        }
        plock(u.u_cdir);
        iput(u.u_cdir);
@@ -723,6 +691,8 @@ fork1(isvfork)
         *  not su and too many procs owned; or
         *  not su and would take last slot.
         */
         *  not su and too many procs owned; or
         *  not su and would take last slot.
         */
+       if (p2==NULL)
+               tablefull("proc");
        if (p2==NULL || (u.u_uid!=0 && (p2==procNPROC-1 || a>MAXUPRC))) {
                u.u_error = EAGAIN;
                if (!isvfork) {
        if (p2==NULL || (u.u_uid!=0 && (p2==procNPROC-1 || a>MAXUPRC))) {
                u.u_error = EAGAIN;
                if (!isvfork) {
index b7c6516..d983425 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_synch.c    4.8     %G%     */
+/*     kern_synch.c    4.9     %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -351,17 +351,9 @@ retry:
 
        for(n=0; n<NOFILE; n++)
                if(u.u_ofile[n] != NULL) {
 
        for(n=0; n<NOFILE; n++)
                if(u.u_ofile[n] != NULL) {
-#ifdef UCBIPC
-                       if (u.u_pofile[n] & ISPORT)
-                               u.u_oport[n]->pt_count++;
-                       else {
-#endif
-                               u.u_ofile[n]->f_count++;
-                               if(!isvfork && u.u_vrpages[n])
-                                       u.u_ofile[n]->f_inode->i_vfdcnt++;
-#ifdef UCBIPC
-                       }
-#endif UCBIPC
+                       u.u_ofile[n]->f_count++;
+                       if(!isvfork && u.u_vrpages[n])
+                               u.u_ofile[n]->f_inode->i_vfdcnt++;
                }
 
        u.u_cdir->i_count++;
                }
 
        u.u_cdir->i_count++;