home *** CD-ROM | disk | FTP | other *** search
-
- /* $Revision Header built automatically *************** (do not edit) ************
- **
- ** © Copyright by GuntherSoft
- **
- ** File : SnakeSYS:CPrgs/ForceIcon/PoolVec.h
- ** Created on : Friday, 25.03.94 01:26:49
- ** Created by : Kai Iske
- ** Current revision : V1.0
- **
- **
- ** Purpose
- ** -------
- ** - Stub functions for Pools. Act like AllocVec()/FreeVec()
- **
- ** Revision V1.0
- ** --------------
- ** created on Friday, 25.03.94 01:26:49 by Kai Iske. LogMessage :
- ** --- Initial release ---
- **
- *********************************************************************************/
-
-
-
- static APTR AllocVecPool(struct FIconSema *FIconSema, ULONG Size)
- {
- ULONG *RetVal;
-
- ObtainSemaphore(&FIconSema->FIconSema);
-
- if((RetVal = AsmAllocPooled(FIconSema->FIconPool, Size + 4, SysBase)))
- *RetVal++ = Size;
-
- ReleaseSemaphore(&FIconSema->FIconSema);
-
- return((APTR)RetVal);
- }
-
-
- static void FreeVecPool(struct FIconSema *FIconSema, APTR Addr)
- {
- ULONG Size = *((ULONG *)Addr - 1);
-
- ObtainSemaphore(&FIconSema->FIconSema);
-
- AsmFreePooled(FIconSema->FIconPool, ((ULONG *)Addr - 1), Size, SysBase);
-
- ReleaseSemaphore(&FIconSema->FIconSema);
- }
-