]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/dev/raidframe/rf_alloclist.h
This commit was generated by cvs2svn to compensate for changes in r106907,
[FreeBSD/FreeBSD.git] / sys / dev / raidframe / rf_alloclist.h
1 /*      $FreeBSD$ */
2 /*      $NetBSD: rf_alloclist.h,v 1.3 1999/02/05 00:06:06 oster Exp $   */
3 /*
4  * Copyright (c) 1995 Carnegie-Mellon University.
5  * All rights reserved.
6  *
7  * Author: Mark Holland
8  *
9  * Permission to use, copy, modify and distribute this software and
10  * its documentation is hereby granted, provided that both the copyright
11  * notice and this permission notice appear in all copies of the
12  * software, derivative works or modified versions, and any portions
13  * thereof, and that both notices appear in supporting documentation.
14  *
15  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18  *
19  * Carnegie Mellon requests users of this software to return to
20  *
21  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
22  *  School of Computer Science
23  *  Carnegie Mellon University
24  *  Pittsburgh PA 15213-3890
25  *
26  * any improvements or extensions that they make and grant Carnegie the
27  * rights to redistribute these changes.
28  */
29
30 /****************************************************************************
31  *
32  * alloclist.h -- header file for alloclist.c
33  *
34  ***************************************************************************/
35
36 #ifndef _RF__RF_ALLOCLIST_H_
37 #define _RF__RF_ALLOCLIST_H_
38
39 #include <dev/raidframe/rf_types.h>
40
41 #define RF_POINTERS_PER_ALLOC_LIST_ELEMENT 20
42
43 struct RF_AllocListElem_s {
44         void   *pointers[RF_POINTERS_PER_ALLOC_LIST_ELEMENT];
45         int     sizes[RF_POINTERS_PER_ALLOC_LIST_ELEMENT];
46         int     numPointers;
47         RF_AllocListElem_t *next;
48 };
49 #define rf_MakeAllocList(_ptr_) _ptr_ = rf_real_MakeAllocList(1);
50 #define rf_AddToAllocList(_l_,_ptr_,_sz_) rf_real_AddToAllocList((_l_), (_ptr_), (_sz_), 1)
51
52 int     rf_ConfigureAllocList(RF_ShutdownList_t ** listp);
53
54 #if RF_UTILITY == 0
55 void    rf_real_AddToAllocList(RF_AllocListElem_t * l, void *p, int size, int lockflag);
56 void    rf_FreeAllocList(RF_AllocListElem_t * l);
57 RF_AllocListElem_t *rf_real_MakeAllocList(int lockflag);
58 #endif                          /* RF_UTILITY == 0 */
59
60 #endif                          /* !_RF__RF_ALLOCLIST_H_ */