386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Wed, 22 Jan 1992 05:24:16 +0000 (21:24 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Wed, 22 Jan 1992 05:24:16 +0000 (21:24 -0800)
Work on file usr/src/sys.386bsd/sys/rlist.h

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/src/sys.386bsd/sys/rlist.h [new file with mode: 0644]

diff --git a/usr/src/sys.386bsd/sys/rlist.h b/usr/src/sys.386bsd/sys/rlist.h
new file mode 100644 (file)
index 0000000..bd468b1
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 1992 William Jolitz. All rights reserved.
+ * Written by William Jolitz 1/92
+ *
+ * Redistribution and use in source and binary forms are freely permitted
+ * provided that the above copyright notice and attribution and date of work
+ * and this paragraph are duplicated in all such forms.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Resource lists.
+ *
+ *     Usage:
+ *             rlist_free(&swapmap, 100, 200); add space to swapmap
+ *             rlist_alloc(&swapmap, 100, &loc); obtain 100 sectors from swap
+ * $Header: /usr/bill/working/sys/sys/RCS/rlist.h,v 1.2 92/01/21 21:23:48 william Exp $
+ */
+
+/* A resource list element. */
+struct rlist {
+       unsigned        rl_start;       /* boundaries of extent - inclusive */
+       unsigned        rl_end;         /* boundaries of extent - inclusive */
+       struct rlist    *rl_next;       /* next list entry, if present */
+};
+
+/* Functions to manipulate resource lists.  */
+extern rlist_free __P((struct rlist **, unsigned, unsigned));
+int rlist_alloc __P((struct rlist **, unsigned, unsigned *));
+extern rlist_destroy __P((struct rlist **));
+
+
+/* heads of lists */
+struct rlist *swapmap;