Shared Persistent Heap Data Environment Manual  1.1.0
sassimplespace.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2014 IBM Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  */
11 
12 #ifndef __SAS_SIMPLE_SPACE_H
13 #define __SAS_SIMPLE_SPACE_H
14 
15 #include "sastype.h"
16 
27 typedef void *SASSimpleSpace_t;
28 
30 #ifdef __cplusplus
31 #define __C__ "C"
32 #else
33 #define __C__
34 #endif
35 
49 extern __C__ SASSimpleSpace_t
50 SASSimpleSpaceInit (void *heap_block, block_size_t block_size, block_size_t space_size);
51 
63 extern __C__ SASSimpleSpace_t
64 SASSimpleSpaceCreate (block_size_t space_size);
65 
75 extern __C__ void*
77 
86 extern __C__ SASSimpleSpace_t
87 SASSimpleSpaceFromAddr (void *space);
88 
98 extern __C__ int
100 
107 extern __C__ block_size_t
109 
117 extern __C__ int
119 
120 #endif /* __SAS_SIMPLE_SPACE_H */
__C__ void * SASSimpleSpaceToAddr(SASSimpleSpace_t space)
Obtain the starting byte address of the simple space within the SASSimpleSpace_t block.
__C__ int SASSimpleSpaceDestroy(SASSimpleSpace_t space)
Destroy a SASSimpleSpace_t and free the shared storage block.
__C__ SASSimpleSpace_t SASSimpleSpaceFromAddr(void *space)
Obtain the SASSimpleSpace_t handle from a contained space address.
void * SASSimpleSpace_t
Handle to SAS Simple Space.
Definition: sassimplespace.h:27
__C__ int SASSimpleSpaceDestroyNoLock(SASSimpleSpace_t space)
Destroy a SASSimpleSpace_t and free the shared storage block.
__C__ SASSimpleSpace_t SASSimpleSpaceInit(void *heap_block, block_size_t block_size, block_size_t space_size)
Initialize a shared storage block as a simple space.
#define __C__
ignore this macro behind the curtain
Definition: sassimplespace.h:33
__C__ SASSimpleSpace_t SASSimpleSpaceCreate(block_size_t space_size)
Allocate a SAS block large enough to contain the requested SAS Simple Space.
__C__ block_size_t SASSimpleSpaceFreeSpace(SASSimpleSpace_t space)
Return the block free space not occupied by control blocks and the simple space.