formatting
[unix-history] / usr / src / sys / kern / kern_descrip.c
index 44e389c..5bd7a0a 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_descrip.c  5.21    82/12/28        */
+/*     kern_descrip.c  5.23    83/01/17        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -137,10 +137,8 @@ close()
        fp = getf(uap->i);
        if (fp == 0)
                return;
        fp = getf(uap->i);
        if (fp == 0)
                return;
-#ifdef SUNMMAP
        if (u.u_pofile[uap->i] & UF_MAPPED)
                munmapfd(uap->i);
        if (u.u_pofile[uap->i] & UF_MAPPED)
                munmapfd(uap->i);
-#endif
        closef(fp, 0, u.u_pofile[uap->i]);
        /* WHAT IF u.u_error ? */
        u.u_ofile[uap->i] = NULL;
        closef(fp, 0, u.u_pofile[uap->i]);
        /* WHAT IF u.u_error ? */
        u.u_ofile[uap->i] = NULL;
@@ -352,21 +350,18 @@ selwakeup(p, coll)
        register struct proc *p;
        int coll;
 {
        register struct proc *p;
        int coll;
 {
-       int s;
 
        if (coll) {
                nselcoll++;
                wakeup((caddr_t)&selwait);
        }
        if (p) {
 
        if (coll) {
                nselcoll++;
                wakeup((caddr_t)&selwait);
        }
        if (p) {
+               int s = spl6();
                if (p->p_wchan == (caddr_t)&selwait)
                        setrun(p);
                if (p->p_wchan == (caddr_t)&selwait)
                        setrun(p);
-               else {
-                       s = spl6();
-                       if (p->p_flag & SSEL)
-                               p->p_flag &= ~SSEL;
-                       splx(s);
-               }
+               else if (p->p_flag & SSEL)
+                       p->p_flag &= ~SSEL;
+               splx(s);
        }
 }
 
        }
 }