home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
workbench
/
forceicon
/
source.lha
/
source
/
PoolVec.h
< prev
next >
Wrap
Text File
|
1995-01-05
|
1KB
|
50 lines
/* $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);
}