+/*
+ * The following several routines allocate and free
+ * buffers with various side effects. In general the
+ * arguments to an allocate routine are a device and
+ * a block number, and the value is a pointer to
+ * to the buffer header; the buffer is marked "busy"
+ * so that no one else can touch it. If the block was
+ * already in core, no I/O need be done; if it is
+ * already busy, the process waits until it becomes free.
+ * The following routines allocate a buffer:
+ * getblk
+ * bread
+ * breada
+ * baddr (if it is incore)
+ * Eventually the buffer must be released, possibly with the
+ * side effect of writing it out, by using one of
+ * bwrite
+ * bdwrite
+ * bawrite
+ * brelse
+ */
+
+#define BUFHSZ 63
+#define BUFHASH(blkno) (blkno % BUFHSZ)
+short bufhash[BUFHSZ];
+
+/*
+ * Initialize hash links for buffers.
+ */
+bhinit()
+{
+ register int i;
+
+ for (i = 0; i < BUFHSZ; i++)
+ bufhash[i] = -1;
+}
+