use IMIN macro to save call overhead
[unix-history] / usr / src / sys / kern / subr_xxx.c
index b1ccbf0..9b0be5b 100644 (file)
@@ -1,4 +1,6 @@
-/*     subr_xxx.c      4.20    82/10/31        */
+/*     subr_xxx.c      6.3     84/07/28        */
+
+#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"
 
@@ -96,13 +97,23 @@ calloc(size)
        return (res);
 }
 
        return (res);
 }
 
+/*
+ * Stub routine in case it is ever possible to free space.
+ */
+cfreemem(cp, size)
+       caddr_t cp;
+       int size;
+{
+       printf("freeing %x, size %d\n", cp, size);
+}
+
 #ifndef vax
 ffs(mask)
        register long mask;
 {
        register int i;
 
 #ifndef vax
 ffs(mask)
        register long mask;
 {
        register int i;
 
-       for(i=1; i<NSIG; i++) {
+       for(i = 1; i < NSIG; i++) {
                if (mask & 1)
                        return (i);
                mask >>= 1;
                if (mask & 1)
                        return (i);
                mask >>= 1;
@@ -131,41 +142,3 @@ strlen(s1)
        return (len);
 }
 #endif
        return (len);
 }
 #endif
-
-/*
- * Pass back c to the user.
- */
-passuc(c, uio)
-       register c;
-       struct uio *uio;
-{
-       register struct iovec *iov = uio->uio_iov;
-
-       switch (uio->uio_segflg) {
-
-       case 0:
-               if (subyte(iov->iov_base, c) < 0)
-                       goto fault;
-               break;
-
-       case 1:
-               *iov->iov_base = c;
-               break;
-
-       case 2:
-               if (suibyte(iov->iov_base, c) < 0)
-                       goto fault;
-               break;
-       }
-       iov->iov_base++;
-       iov->iov_len--;
-       uio->uio_resid--;
-       uio->uio_offset++;
-       if (iov->iov_len <= 0) {
-               uio->uio_iov++;
-               uio->uio_iovcnt--;
-       }
-       return (0);
-fault:
-       return (EFAULT);
-}