sun merge
[unix-history] / usr / src / sys / kern / subr_xxx.c
index 63188c2..86efb60 100644 (file)
@@ -1,4 +1,6 @@
-/*     subr_xxx.c      4.18    82/10/17        */
+/*     subr_xxx.c      4.21    82/12/17        */
+
+#include "../machine/pte.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -10,7 +12,6 @@
 #include "../h/proc.h"
 #include "../h/fs.h"
 #include "../h/vm.h"
 #include "../h/proc.h"
 #include "../h/fs.h"
 #include "../h/vm.h"
-#include "../h/pte.h"
 #include "../h/cmap.h"
 #include "../h/uio.h"
 
 #include "../h/cmap.h"
 #include "../h/uio.h"
 
@@ -47,7 +48,7 @@ imax(a, b)
 
 unsigned
 min(a, b)
 
 unsigned
 min(a, b)
-       unsigned int a, b;
+       u_int a, b;
 {
 
        return (a < b ? a : b);
 {
 
        return (a < b ? a : b);
@@ -55,11 +56,12 @@ min(a, b)
 
 unsigned
 max(a, b)
 
 unsigned
 max(a, b)
-       unsigned int a, b;
+       u_int a, b;
 {
 
        return (a > b ? a : b);
 }
 {
 
        return (a > b ? a : b);
 }
+
 extern cabase, calimit;
 extern struct pte camap[];
 
 extern cabase, calimit;
 extern struct pte camap[];
 
@@ -109,25 +111,12 @@ ffs(mask)
        return (0);
 }
 
        return (0);
 }
 
-ffs(mask)
-       register long mask;
-{
-       register int i;
-
-       for(i=1; i<NSIG; i++) {
-               if (mask & 1)
-                       return (i);
-               mask >>= 1;
-       }
-       return (0);
-}
-
 bcmp(s1, s2, len)
        register char *s1, *s2;
        register int len;
 {
 
 bcmp(s1, s2, len)
        register char *s1, *s2;
        register int len;
 {
 
-       while (--len)
+       while (len--)
                if (*s1++ != *s2++)
                        return (1);
        return (0);
                if (*s1++ != *s2++)
                        return (1);
        return (0);