Now have very necessary include safety checks
[unix-history] / sys / sys / rlist.h
CommitLineData
15637ed4
RG
1/*
2 * Copyright (c) 1992 William Jolitz. All rights reserved.
3 * Written by William Jolitz 1/92
4 *
5 * Redistribution and use in source and binary forms are freely permitted
6 * provided that the above copyright notice and attribution and date of work
7 * and this paragraph are duplicated in all such forms.
8 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Resource lists.
13 *
14 * Usage:
15 * rlist_free(&swapmap, 100, 200); add space to swapmap
16 * rlist_alloc(&swapmap, 100, &loc); obtain 100 sectors from swap
fea210d0 17 * $Header: /a/cvs/386BSD/src/sys.386bsd/sys/rlist.h,v 1.1.1.1 1993/06/12 14:58:17 rgrimes Exp $
15637ed4
RG
18 */
19
20/* A resource list element. */
21struct rlist {
22 unsigned rl_start; /* boundaries of extent - inclusive */
23 unsigned rl_end; /* boundaries of extent - inclusive */
24 struct rlist *rl_next; /* next list entry, if present */
25};
26
27/* Functions to manipulate resource lists. */
28extern rlist_free __P((struct rlist **, unsigned, unsigned));
29int rlist_alloc __P((struct rlist **, unsigned, unsigned *));
30extern rlist_destroy __P((struct rlist **));
31
32
33/* heads of lists */
34struct rlist *swapmap;