G:/ScriptBasic/source/extensions/rpool.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "rpool.h"

Go to the source code of this file.

Defines

#define rpmALLOC(X)   RPool->pSt->Alloc((X),RPool->pMemorySegment)
#define rpmFREE(X)   RPool->pSt->Free((X),RPool->pMemorySegment)

Functions

static void rpm_open (void *p)
void rpm_close (void *p)
void rpm_close_excess (void *p)
static void rpm_thread (void *p)
static void rpm_ager (void *p)
void * rpm_NewPool (pSupportTable pSt, unsigned long lMaxBurn, unsigned long lMaxTime, unsigned long lMaxUse, unsigned long lMinFree, unsigned long lMaxFree, unsigned long lWaitSleep, void *pool, void *(*fpOpen)(void *), void(*fpClose)(void *, void *), void *(*myalloc)(size_t), void(*myfree)(void *), unsigned long(*timefun)(void *))
void * rpm_GetResource (rpm_pool_t *RPool, unsigned long lMaxWait)
void rpm_PutResource (rpm_pool_t *RPool, void *p)


Define Documentation

#define rpmALLOC  )     RPool->pSt->Alloc((X),RPool->pMemorySegment)
 

Definition at line 72 of file rpool.c.

Referenced by rpm_open().

#define rpmFREE  )     RPool->pSt->Free((X),RPool->pMemorySegment)
 

Definition at line 73 of file rpool.c.

Referenced by rpm_close().


Function Documentation

static void rpm_ager void *  p  )  [static]
 

Definition at line 347 of file rpool.c.

References besLockMutex(), besUnlockMutex(), and pSt.

Referenced by rpm_NewPool().

void rpm_close void *  p  ) 
 

Definition at line 205 of file rpool.c.

References rpmFREE.

Referenced by rpm_close_excess(), rpm_PutResource(), and rpm_thread().

void rpm_close_excess void *  p  ) 
 

Definition at line 229 of file rpool.c.

References besLockMutex(), besUnlockMutex(), NULL, pSt, and rpm_close().

Referenced by rpm_thread().

void* rpm_GetResource rpm_pool_t *  RPool,
unsigned long  lMaxWait
 

Definition at line 522 of file rpool.c.

References besLockMutex(), besUnlockMutex(), and NULL.

void* rpm_NewPool pSupportTable  pSt,
unsigned long  lMaxBurn,
unsigned long  lMaxTime,
unsigned long  lMaxUse,
unsigned long  lMinFree,
unsigned long  lMaxFree,
unsigned long  lWaitSleep,
void *  pool,
void *(*)(void *)  fpOpen,
void(*)(void *, void *)  fpClose,
void *(*)(size_t)  myalloc,
void(*)(void *)  myfree,
unsigned long(*)(void *)  timefun
 

Definition at line 378 of file rpool.c.

References free(), NULL, rpm_ager(), and rpm_thread().

static void rpm_open void *  p  )  [static]
 

Definition at line 136 of file rpool.c.

References besLockMutex(), besUnlockMutex(), NULL, pSt, and rpmALLOC.

Referenced by rpm_thread().

void rpm_PutResource rpm_pool_t *  RPool,
void *  p
 

Definition at line 579 of file rpool.c.

References besLockMutex(), besUnlockMutex(), NULL, and rpm_close().

static void rpm_thread void *  p  )  [static]
 

Definition at line 264 of file rpool.c.

References besLockMutex(), besUnlockMutex(), NULL, pSt, rpm_close(), rpm_close_excess(), and rpm_open().

Referenced by rpm_NewPool().


Generated on Sun Mar 12 23:56:37 2006 for ScriptBasic by  doxygen 1.4.6-NO