2 /* $NetBSD: rf_alloclist.h,v 1.3 1999/02/05 00:06:06 oster Exp $ */
4 * Copyright (c) 1995 Carnegie-Mellon University.
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.
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.
19 * Carnegie Mellon requests users of this software to return to
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
30 /****************************************************************************
32 * alloclist.h -- header file for alloclist.c
34 ***************************************************************************/
36 #ifndef _RF__RF_ALLOCLIST_H_
37 #define _RF__RF_ALLOCLIST_H_
39 #include <dev/raidframe/rf_types.h>
41 #define RF_POINTERS_PER_ALLOC_LIST_ELEMENT 20
43 struct RF_AllocListElem_s {
44 void *pointers[RF_POINTERS_PER_ALLOC_LIST_ELEMENT];
45 int sizes[RF_POINTERS_PER_ALLOC_LIST_ELEMENT];
47 RF_AllocListElem_t *next;
49 #define rf_MakeAllocList(_ptr_) _ptr_ = rf_real_MakeAllocList(1);
50 #define rf_AddToAllocList(_l_,_ptr_,_sz_) rf_real_AddToAllocList((_l_), (_ptr_), (_sz_), 1)
52 int rf_ConfigureAllocList(RF_ShutdownList_t ** listp);
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 */
60 #endif /* !_RF__RF_ALLOCLIST_H_ */