The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/rlist.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 MERCHANTABILITY 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
   17  *
   18  *      from: unknown?
   19  * $FreeBSD: src/sys/sys/rlist.h,v 1.9.4.1 1999/09/05 08:22:49 peter Exp $
   20  */
   21 
   22 #ifndef _SYS_RLIST_H_
   23 #define _SYS_RLIST_H_
   24 
   25 /* A resource list element. */
   26 struct rlist {
   27         unsigned        rl_start;       /* boundaries of extent - inclusive */
   28         unsigned        rl_end;         /* boundaries of extent - inclusive */
   29         struct rlist    *rl_next;       /* next list entry, if present */
   30 };
   31 
   32 struct rlisthdr {
   33         int             rlh_lock;               /* list lock */
   34         struct          rlist *rlh_list;        /* list itself */
   35 };
   36 
   37 #define RLH_DESIRED     0x2
   38 #define RLH_LOCKED      0x1
   39 
   40 /* extern struct rlisthdr swaplist; */
   41 
   42 /* Functions to manipulate resource lists.  */
   43 extern void rlist_free __P((struct rlisthdr *, unsigned, unsigned));
   44 int rlist_alloc __P((struct rlisthdr *, unsigned, unsigned *));
   45 extern void rlist_destroy __P((struct rlisthdr *));
   46 
   47 #endif  /* _SYS_RLIST_H_ */

Cache object: 1b5013476d2a906afc993c06a943cc47


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.