Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pci / n8 / common / userPool.h
blob0bdc37877578f317608c5677cc71cc3f5957a599
1 /*-
2 * Copyright (C) 2001-2003 by NBMK Encryption Technologies.
3 * All rights reserved.
5 * NBMK Encryption Technologies provides no support of any kind for
6 * this software. Questions or concerns about it may be addressed to
7 * the members of the relevant open-source community at
8 * <tech-crypto@netbsd.org>.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are
12 * met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer in the documentation and/or other materials provided
20 * with the distribution.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /*****************************************************************************
36 * @(#) userPool.h 1.5@(#)
37 *****************************************************************************/
38 /*****************************************************************************/
39 /** @file userPool.h
40 * @brief This file contains prototypes for user pool library.
42 * This file provides a prototypes for functions used manage the user pool.
44 *****************************************************************************/
46 /*****************************************************************************
47 * Revision history:
48 * 05/08/03 brr Modified user pools to take advantage of the support for
49 * multiple memory banks.
50 * 07/11/02 brr Do not fail userPoolInit if banks is 0.
51 * 07/02/02 brr Added prototype for userPoolStats.
52 * 06/24/02 brr File created.
53 ****************************************************************************/
54 #ifndef USERPOOL_H
55 #define USERPOOL_H
57 #ifdef VX_BUILD
59 #undef DEF_USER_POOL_BANKS
60 #define DEF_USER_POOL_BANKS 0
61 #define userPoolCount() 0
62 #define userPoolInit(p1, p2, p3)
63 #define userPoolRelease()
64 #define userPoolFreePool(p1)
66 #else
68 void userPoolDisplay(void);
69 int userPoolCount(void);
71 void userPoolInit( unsigned int banks,
72 unsigned long size,
73 unsigned long granularity);
75 void userPoolRelease(void);
77 unsigned long userPoolAlloc(int sessID);
79 void userPoolFree(int sessID);
80 void userPoolFreePool(int bankIndex);
82 void userPoolStats(MemStats_t *memStatsPtr);
84 #endif
86 #endif /* USERPOOL_H */