Data Structures | Defines | Typedefs | Functions | Variables

resource.c File Reference

#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hashmap.h"
#include "wizard/log.h"
#include "wizard/memory_.h"
#include "wizard/option.h"
#include "wizard/random_.h"
#include "wizard/resource_.h"
#include "wizard/semaphore.h"
#include "wizard/signature.h"
#include "wizard/splay-tree.h"
#include "wizard/string_.h"
#include "wizard/string-private.h"
#include "wizard/token.h"
#include "wizard/utility.h"

Data Structures

struct  _ResourceInfo

Defines

#define WizardResourceInfinity   (~0UL)
#define O_NOFOLLOW   0
#define TMP_MAX   238328

Typedefs

typedef struct _ResourceInfo ResourceInfo

Functions

WizardExport WizardBooleanType AcquireUniqueFilename (char *path, ExceptionInfo *exception)
static void * DestroyTemporaryResources (void *temporary_resource)
static WizardBooleanType GetPathTemplate (const char *path, char *filename)
WizardExport int AcquireUniqueFileResource (const char *path, char *filename, ExceptionInfo *exception)
WizardExport WizardBooleanType AcquireWizardResource (const ResourceType type, const WizardSizeType size)
WizardExport void AsynchronousResourceComponentTerminus (void)
WizardExport WizardSizeType GetWizardResource (const ResourceType type)
WizardExport WizardSizeType GetWizardResourceLimit (const ResourceType type)
WizardExport WizardBooleanType ListWizardResourceInfo (FILE *file, ExceptionInfo *wizard_unused(exception))
WizardExport void RelinquishWizardResource (const ResourceType type, const WizardSizeType size)
WizardExport WizardBooleanType RelinquishUniqueFileResource (const char *path, const WizardBooleanType trash)
static ssize_t WizardMax (const ssize_t x, const ssize_t y)
WizardExport WizardBooleanType ResourceComponentGenesis (void)
WizardExport void ResourceComponentTerminus (void)
WizardExport WizardBooleanType SetWizardResourceLimit (const ResourceType type, const WizardSizeType limit)

Variables

static RandomInforandom_info = (RandomInfo *) NULL
static ResourceInfo resource_info
static SemaphoreInforesource_semaphore = (SemaphoreInfo *) NULL
static SplayTreeInfotemporary_resources = (SplayTreeInfo *) NULL

Define Documentation

#define O_NOFOLLOW   0
#define TMP_MAX   238328
#define WizardResourceInfinity   (~0UL)

Referenced by ListWizardResourceInfo().


Typedef Documentation

typedef struct _ResourceInfo ResourceInfo

Function Documentation

WizardExport WizardBooleanType AcquireUniqueFilename ( char *  path,
ExceptionInfo exception 
)
WizardExport int AcquireUniqueFileResource ( const char *  path,
char *  filename,
ExceptionInfo exception 
)
WizardExport WizardBooleanType AcquireWizardResource ( const ResourceType  type,
const WizardSizeType  size 
)
WizardExport void AsynchronousResourceComponentTerminus ( void   ) 
static void* DestroyTemporaryResources ( void *  temporary_resource  )  [static]

References DestroyString().

Referenced by AcquireUniqueFileResource().

static WizardBooleanType GetPathTemplate ( const char *  path,
char *  filename 
) [static]
WizardExport WizardSizeType GetWizardResource ( const ResourceType  type  ) 
WizardExport WizardSizeType GetWizardResourceLimit ( const ResourceType  type  ) 
WizardExport WizardBooleanType ListWizardResourceInfo ( FILE *  file,
ExceptionInfo wizard_unusedexception 
)
WizardExport WizardBooleanType RelinquishUniqueFileResource ( const char *  path,
const WizardBooleanType  trash 
)
WizardExport void RelinquishWizardResource ( const ResourceType  type,
const WizardSizeType  size 
)
WizardExport WizardBooleanType ResourceComponentGenesis ( void   ) 
WizardExport void ResourceComponentTerminus ( void   ) 
WizardExport WizardBooleanType SetWizardResourceLimit ( const ResourceType  type,
const WizardSizeType  limit 
)
static ssize_t WizardMax ( const ssize_t  x,
const ssize_t  y 
) [inline, static]

Variable Documentation

RandomInfo* random_info = (RandomInfo *) NULL [static]