2 * Copyright (C) 2001-2003 by NBMK Encryption Technologies.
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>.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are
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 /*****************************************************************************/
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 /*****************************************************************************
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 ****************************************************************************/
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)
68 void userPoolDisplay(void);
69 int userPoolCount(void);
71 void userPoolInit( unsigned int banks
,
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
);
86 #endif /* USERPOOL_H */