Fixed compiler warnings.
[AROS.git] / compiler / alib / libcreatepool.c
blobdeb79e8051e4df3365f141fc7bf9e457b8581e0e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Original version from libnix
4 $Id$
5 */
7 #define AROS_LIBREQ(base,ver) /* We test for versions manually */
9 #include "pool.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/alib.h>
16 APTR LibCreatePool (
18 /* SYNOPSIS */
19 ULONG requirements,
20 ULONG puddleSize,
21 ULONG threshSize)
23 /* FUNCTION
25 INPUTS
27 RESULT
29 NOTES
31 EXAMPLE
33 BUGS
35 SEE ALSO
37 INTERNALS
39 HISTORY
40 06.12.96 digulla Created after original from libnix
42 ******************************************************************************/
44 if (SysBase->LibNode.lib_Version >= 39)
45 return (CreatePool (requirements, puddleSize, threshSize));
48 POOL * pool = NULL;
50 if (threshSize <= puddleSize)
52 if ((pool = (POOL *)AllocMem (sizeof (POOL), MEMF_ANY)) != NULL)
54 NEWLIST (&pool->PuddleList);
56 puddleSize = ((puddleSize + 7) & ~7);
58 pool->MemoryFlags = requirements;
59 pool->PuddleSize = puddleSize;
60 pool->ThreshSize = threshSize;
64 return (APTR)pool;
66 } /* LibCreatePool */