Loading...
Searching...
No Matches
sassim.h
Go to the documentation of this file.
/*
* Copyright (c) 2009-2014 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation, Steven Munroe - initial API and implementation
*/
#ifndef __SAS_SIM_H
#define __SAS_SIM_H
#include <stdlib.h>
typedef unsigned long sasseg_t;
#ifdef __cplusplus
#define __C__ "C"
#else
#define __C__
#endif
extern __C__ int sasClearOnDealloc;
extern __C__ unsigned long getMemLow();
extern __C__ unsigned long getMemHigh();
extern __C__ void
setSASmemrange (unsigned long low, unsigned long high);
extern __C__ int SASJoinRegion();
extern __C__ int SASJoinRegionByName (const char * store_name);
extern __C__ void *SASBlockAlloc (unsigned long blockSize);
extern __C__ void SASBlockDealloc (void *blockAddr, unsigned long blockSize);
extern __C__ void SASListFreeRegion ( void **blockAddr,
unsigned long *blockSize,
int *count);
extern __C__ void SASListAllocatedRegion (void **blockAddr,
unsigned long *blockSize,
int *count);
extern __C__ void SASListInUseMem (void **blockAddr, unsigned long *blockSize,
int *count);
extern __C__ void SASListFreeMem (void **blockAddr, unsigned long *blockSize,
int *count);
extern __C__ void SASListUncommittedMem (void **blockAddr, unsigned long *blockSize,
int *count);
extern __C__ unsigned int SASAnchorFreeSpace();
extern __C__ void SASReset();
extern __C__ void SASSeize();
extern __C__ void SASRelease();
extern __C__ void SASResetSem();
extern __C__ void SASCleanUp ();
extern __C__ void SASThreadSetUp ();
extern __C__ void SASThreadCleanUp ();
extern __C__ void SASRemove();
extern __C__ void setSASFinder (void *);
extern __C__ void *getSASFinder();
#endif /* __SAS_SIM_H */
__C__
#define __C__
ignore this macro behind the curtain
Definition sasmsync.h:32
SASBlockDealloc
__C__ void SASBlockDealloc(void *blockAddr, unsigned long blockSize)
Deallocate a block of memory within SAS Storage.
setSASmemrange
__C__ void setSASmemrange(unsigned long low, unsigned long high)
Set the Region's low/high memory address for testing.
SASAnchorFreeSpace
__C__ unsigned int SASAnchorFreeSpace()
Get the current number of free bytes within the Anchor blocks internal heap.
SASBlockAlloc
__C__ void * SASBlockAlloc(unsigned long blockSize)
Allocate a block of memory within SAS Storage.
SASCleanUp
__C__ void SASCleanUp()
Process wide cleanup for the SAS runtime. +* +*.
setSASFinder
__C__ void setSASFinder(void *)
Sets the SAS finder pointer to a SAS block or utility object.
SASJoinRegionByName
__C__ int SASJoinRegionByName(const char *store_name)
Join this process to a named SAS Region.
SASListInUseMem
__C__ void SASListInUseMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated block addresses and sizes.
SASRemove
__C__ void SASRemove()
Remove the SAS Region.
SASReset
__C__ void SASReset()
Reset the SAS Region back to initial state.
SASResetSem
__C__ void SASResetSem()
Reset the internal Semaphores used by Seize/Release the SAS lock manager.
SASListUncommittedMem
__C__ void SASListUncommittedMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently uncommitted block addresses and sizes.
getMemHigh
__C__ unsigned long getMemHigh()
Get the Region's highest memory address.
sasseg_t
unsigned long sasseg_t
SAS segment ID.
Definition sassim.h:115
SASThreadCleanUp
__C__ void SASThreadCleanUp()
Thread specific cleanup for secondary thread accessing the SAS region.
SASRelease
__C__ void SASRelease()
Release the anchor block master lock.
getSASFinder
__C__ void * getSASFinder()
Get the SAS finder address.
SASListFreeMem
__C__ void SASListFreeMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of freed block addresses and sizes.
SASListFreeRegion
__C__ void SASListFreeRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently free segment block addresses and sizes.
getMemLow
__C__ unsigned long getMemLow()
Get the Region's lowest memory address.
SASThreadSetUp
__C__ void SASThreadSetUp()
Thread specific setup for secondary thread accessing the SAS region.
SASSeize
__C__ void SASSeize()
Seize the anchor block master lock.
SASListAllocatedRegion
__C__ void SASListAllocatedRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated segment block addresses and sizes.
sasClearOnDealloc
__C__ int sasClearOnDealloc
SAS clear on block deallocate flag.
SASJoinRegion
__C__ int SASJoinRegion()
Join this process to a SAS Region.