header file cleanup while moving vax files to their own directory
authorBill Joy <root@ucbvax.Berkeley.EDU>
Mon, 11 Oct 1982 09:12:38 +0000 (01:12 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Mon, 11 Oct 1982 09:12:38 +0000 (01:12 -0800)
SCCS-vsn: sys/sys/acct.h 4.5
SCCS-vsn: sys/sys/buf.h 4.17
SCCS-vsn: sys/sys/file.h 4.13
SCCS-vsn: sys/ufs/ffs/fs.h 4.3
SCCS-vsn: sys/ufs/ffs/dinode.h 4.15
SCCS-vsn: sys/ufs/ffs/inode.h 4.15
SCCS-vsn: sys/ufs/ufs/dinode.h 4.15
SCCS-vsn: sys/ufs/ufs/inode.h 4.15
SCCS-vsn: sys/sys/param.h 4.22

usr/src/sys/sys/acct.h
usr/src/sys/sys/buf.h
usr/src/sys/sys/file.h
usr/src/sys/sys/param.h
usr/src/sys/ufs/ffs/dinode.h
usr/src/sys/ufs/ffs/fs.h
usr/src/sys/ufs/ffs/inode.h
usr/src/sys/ufs/ufs/dinode.h
usr/src/sys/ufs/ufs/inode.h

index 93e51a4..0c2c21c 100644 (file)
@@ -1,4 +1,4 @@
-/*     acct.h  4.4     82/07/12        */
+/*     acct.h  4.5     82/10/10        */
 
 /*
  * Accounting structures;
 
 /*
  * Accounting structures;
@@ -30,3 +30,8 @@ struct        acct
 
 #define        ACCTLO  30              /* acctg off when space < this */
 #define        ACCTHI  100             /* acctg resumes at this level */
 
 #define        ACCTLO  30              /* acctg off when space < this */
 #define        ACCTHI  100             /* acctg resumes at this level */
+
+#ifdef KERNEL
+struct acct    acctbuf;
+struct inode   *acctp;
+#endif
index 1baa240..d05b1f7 100644 (file)
@@ -1,4 +1,4 @@
-/*     buf.h   4.16    82/05/31        */
+/*     buf.h   4.17    82/10/10        */
 
 /*
  * The header for buffers in the buffer pool and otherwise used
 
 /*
  * The header for buffers in the buffer pool and otherwise used
@@ -172,3 +172,9 @@ unsigned minphys();
        blkclr(bp->b_un.b_addr, bp->b_bcount); \
        bp->b_resid = 0; \
 }
        blkclr(bp->b_un.b_addr, bp->b_bcount); \
        bp->b_resid = 0; \
 }
+
+#ifdef KERNEL
+struct buf     bfreelist[BQUEUES];     /* buffer chain headers */
+struct buf     bswlist;        /* free list of swap headers */
+struct buf     *bclnlist;      /* header for list of cleaned pages */
+#endif
index 29e7b51..16ff7ab 100644 (file)
@@ -1,4 +1,4 @@
-/*     file.h  4.12    82/08/10        */
+/*     file.h  4.13    82/10/10        */
 
 #ifdef KERNEL
 /*
 
 #ifdef KERNEL
 /*
@@ -77,3 +77,10 @@ struct       file *falloc();
 #define        FTYPE_CDEV      0x2000  /* character special device */
 #define        FTYPE_DIR       0x4000  /* directory */
 #define        FTYPE_BDEV      0x8000  /* block special device */
 #define        FTYPE_CDEV      0x2000  /* character special device */
 #define        FTYPE_DIR       0x4000  /* directory */
 #define        FTYPE_BDEV      0x8000  /* block special device */
+
+#define        GETF(fp, fd) { \
+       if ((unsigned)(fd) >= NOFILE || ((fp) = u.u_ofile[fd]) == NULL) { \
+               u.u_error = EBADF; \
+               return; \
+       } \
+}
index 59f6d9c..90276f1 100644 (file)
@@ -1,4 +1,4 @@
-/*     param.h 4.21    82/08/24        */
+/*     param.h 4.22    82/10/10        */
 
 /*
  * Tunable variables which do not usually vary per system.
 
 /*
  * Tunable variables which do not usually vary per system.
@@ -47,6 +47,9 @@
 #include <signal.h>
 #endif
 
 #include <signal.h>
 #endif
 
+#define        ISSIG(p)        ((p)->p_sig && \
+       ((p)->p_flag&STRC || ((p)->p_sig &~ (p)->p_ignsig)) && issig())
+
 /*
  * Return values from tsleep().
  */
 /*
  * Return values from tsleep().
  */
index 70d1fa7..abec430 100644 (file)
@@ -1,4 +1,4 @@
-/*     dinode.h        4.14    82/08/10        */
+/*     dinode.h        4.15    82/10/10        */
 
 /*
  * The I node is the focus of all file activity in UNIX.
 
 /*
  * The I node is the focus of all file activity in UNIX.
@@ -98,7 +98,7 @@ struct        inode *namei();
 #endif
 
 /* flags */
 #endif
 
 /* flags */
-#define        ILOCK           0x1             /* inode is locked */
+#define        ILOCKED         0x1             /* inode is locked */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
@@ -123,3 +123,24 @@ struct     inode *namei();
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
+
+#define        ILOCK(ip) { \
+       while ((ip)->i_flag & ILOCKED) { \
+               (ip)->i_flag |= IWANT; \
+               sleep((caddr_t)(ip), PINOD); \
+       } \
+       (ip)->i_flag |= ILOCKED; \
+}
+
+#define        IUNLOCK(ip) { \
+       (ip)->i_flag &= ~ILOCKED; \
+       if ((ip)->i_flag&IWANT) { \
+               (ip)->i_flag &= ~IWANT; \
+               wakeup((caddr_t)(ip)); \
+       } \
+}
+
+#define        IUPDAT(ip, t1, t2, waitfor) { \
+       if (ip->i_flag&(IUPD|IACC|ICHG)) \
+               iupdat(ip, t1, t2, waitfor); \
+}
index 425c6c3..7232ae8 100644 (file)
@@ -1,6 +1,4 @@
-/* Copyright (c) 1981 Regents of the University of California */
-
-/*     fs.h    4.2     82/06/14        */
+/*     fs.h    4.3     82/10/10        */
 
 /*
  * Each disk drive contains some number of file systems.
 
 /*
  * Each disk drive contains some number of file systems.
index b3de1ba..4e84303 100644 (file)
@@ -1,4 +1,4 @@
-/*     inode.h 4.14    82/08/10        */
+/*     inode.h 4.15    82/10/10        */
 
 /*
  * The I node is the focus of all file activity in UNIX.
 
 /*
  * The I node is the focus of all file activity in UNIX.
@@ -98,7 +98,7 @@ struct        inode *namei();
 #endif
 
 /* flags */
 #endif
 
 /* flags */
-#define        ILOCK           0x1             /* inode is locked */
+#define        ILOCKED         0x1             /* inode is locked */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
@@ -123,3 +123,24 @@ struct     inode *namei();
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
+
+#define        ILOCK(ip) { \
+       while ((ip)->i_flag & ILOCKED) { \
+               (ip)->i_flag |= IWANT; \
+               sleep((caddr_t)(ip), PINOD); \
+       } \
+       (ip)->i_flag |= ILOCKED; \
+}
+
+#define        IUNLOCK(ip) { \
+       (ip)->i_flag &= ~ILOCKED; \
+       if ((ip)->i_flag&IWANT) { \
+               (ip)->i_flag &= ~IWANT; \
+               wakeup((caddr_t)(ip)); \
+       } \
+}
+
+#define        IUPDAT(ip, t1, t2, waitfor) { \
+       if (ip->i_flag&(IUPD|IACC|ICHG)) \
+               iupdat(ip, t1, t2, waitfor); \
+}
index 70d1fa7..abec430 100644 (file)
@@ -1,4 +1,4 @@
-/*     dinode.h        4.14    82/08/10        */
+/*     dinode.h        4.15    82/10/10        */
 
 /*
  * The I node is the focus of all file activity in UNIX.
 
 /*
  * The I node is the focus of all file activity in UNIX.
@@ -98,7 +98,7 @@ struct        inode *namei();
 #endif
 
 /* flags */
 #endif
 
 /* flags */
-#define        ILOCK           0x1             /* inode is locked */
+#define        ILOCKED         0x1             /* inode is locked */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
@@ -123,3 +123,24 @@ struct     inode *namei();
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
+
+#define        ILOCK(ip) { \
+       while ((ip)->i_flag & ILOCKED) { \
+               (ip)->i_flag |= IWANT; \
+               sleep((caddr_t)(ip), PINOD); \
+       } \
+       (ip)->i_flag |= ILOCKED; \
+}
+
+#define        IUNLOCK(ip) { \
+       (ip)->i_flag &= ~ILOCKED; \
+       if ((ip)->i_flag&IWANT) { \
+               (ip)->i_flag &= ~IWANT; \
+               wakeup((caddr_t)(ip)); \
+       } \
+}
+
+#define        IUPDAT(ip, t1, t2, waitfor) { \
+       if (ip->i_flag&(IUPD|IACC|ICHG)) \
+               iupdat(ip, t1, t2, waitfor); \
+}
index b3de1ba..4e84303 100644 (file)
@@ -1,4 +1,4 @@
-/*     inode.h 4.14    82/08/10        */
+/*     inode.h 4.15    82/10/10        */
 
 /*
  * The I node is the focus of all file activity in UNIX.
 
 /*
  * The I node is the focus of all file activity in UNIX.
@@ -98,7 +98,7 @@ struct        inode *namei();
 #endif
 
 /* flags */
 #endif
 
 /* flags */
-#define        ILOCK           0x1             /* inode is locked */
+#define        ILOCKED         0x1             /* inode is locked */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
 #define        IUPD            0x2             /* file has been modified */
 #define        IACC            0x4             /* inode access time to be updated */
 #define        IMOUNT          0x8             /* inode is mounted on */
@@ -123,3 +123,24 @@ struct     inode *namei();
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
 #define        IREAD           0400            /* read, write, execute permissions */
 #define        IWRITE          0200
 #define        IEXEC           0100
+
+#define        ILOCK(ip) { \
+       while ((ip)->i_flag & ILOCKED) { \
+               (ip)->i_flag |= IWANT; \
+               sleep((caddr_t)(ip), PINOD); \
+       } \
+       (ip)->i_flag |= ILOCKED; \
+}
+
+#define        IUNLOCK(ip) { \
+       (ip)->i_flag &= ~ILOCKED; \
+       if ((ip)->i_flag&IWANT) { \
+               (ip)->i_flag &= ~IWANT; \
+               wakeup((caddr_t)(ip)); \
+       } \
+}
+
+#define        IUPDAT(ip, t1, t2, waitfor) { \
+       if (ip->i_flag&(IUPD|IACC|ICHG)) \
+               iupdat(ip, t1, t2, waitfor); \
+}