- Set a default PCM volume so that something can be heard when driver is
[AROS.git] / compiler / alib / libcreatepool.c
blobe1160b1aae79b5f8f8ea9f86b41be5470bceee64
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Original version from libnix
4 $Id$
5 */
7 #include "pool.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/alib.h>
14 APTR LibCreatePool (
16 /* SYNOPSIS */
17 ULONG requirements,
18 ULONG puddleSize,
19 ULONG threshSize)
21 /* FUNCTION
23 INPUTS
25 RESULT
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
35 INTERNALS
37 HISTORY
38 06.12.96 digulla Created after original from libnix
40 ******************************************************************************/
42 if (SysBase->LibNode.lib_Version >= 39)
43 return (CreatePool (requirements, puddleSize, threshSize));
46 POOL * pool = NULL;
48 if (threshSize <= puddleSize)
50 if ((pool = (POOL *)AllocMem (sizeof (POOL), MEMF_ANY)) != NULL)
52 NEWLIST (&pool->PuddleList);
54 puddleSize = ((puddleSize + 7) & ~7);
56 pool->MemoryFlags = requirements;
57 pool->PuddleSize = puddleSize;
58 pool->ThreshSize = threshSize;
62 return (APTR)pool;
64 } /* LibCreatePool */