Shared Persistent Heap Data Environment Manual  1.1.0
sassimplestack.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_STACK_H
13 #define __SAS_SIMPLE_STACK_H
14 
15 #include "sastype.h"
16 
17 
28 typedef void *SASSimpleStack_t;
29 
31 #ifdef __cplusplus
32 #define __C__ "C"
33 #else
34 #define __C__
35 #endif
36 
49 extern __C__ SASSimpleStack_t
50 SASSimpleStackInit (void *heap_block, block_size_t block_size);
51 
62 extern __C__ SASSimpleStack_t
63 SASSimpleStackCreate (block_size_t stack_size);
64 
74 extern __C__ int
76 
82 extern __C__ block_size_t
84 
92 extern __C__ void *
93 SASSimpleStackAlloc (SASSimpleStack_t stack, block_size_t alloc_size);
94 
105 extern __C__ void *
106 SASSimpleStackNearAlloc (void *near_stack, block_size_t alloc_size);
107 
115 extern __C__ int
116 SASSimpleStackDealloc (SASSimpleStack_t stack, void* stack_pointer);
117 
125 extern __C__ int
127 
133 extern __C__ block_size_t
135 
142 extern __C__ void *
143 SASSimpleStackAllocNoLock (SASSimpleStack_t stack, block_size_t alloc_size);
144 
154 extern __C__ void *
155 SASSimpleStackNearAllocNoLock (void *near_stack, block_size_t alloc_size);
156 
164 extern __C__ int
165 SASSimpleStackDeallocNoLock (SASSimpleStack_t stack, void* stack_pointer);
166 
167 #endif /* __SAS_SIMPLE_STACK_H */
void * SASSimpleStack_t
Handle to SAS Simple Stack.
Definition: sassimplestack.h:28
__C__ void * SASSimpleStackAllocNoLock(SASSimpleStack_t stack, block_size_t alloc_size)
Allocate a sub range of a SAS Simple Stack as s push down stack.
__C__ int SASSimpleStackDestroyNoLock(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.
__C__ void * SASSimpleStackNearAllocNoLock(void *near_stack, block_size_t alloc_size)
Allocate a sub range of a SAS Simple Stack as a push down stack.
__C__ block_size_t SASSimpleStackFreeSpace(SASSimpleStack_t stack)
Return the block free space not currently allocated to the stack.
#define __C__
ignore this macro behind the curtain
Definition: sassimplestack.h:34
__C__ block_size_t SASSimpleStackFreeSpaceNoLock(SASSimpleStack_t stack)
Return the block free space not currently allocated to the stack.
__C__ void * SASSimpleStackNearAlloc(void *near_stack, block_size_t alloc_size)
Atomically allocate a sub range of a SAS Simple Stack as a push down stack.
__C__ int SASSimpleStackDestroy(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.
__C__ SASSimpleStack_t SASSimpleStackCreate(block_size_t stack_size)
Allocate a SAS block as a simple stack.
__C__ void * SASSimpleStackAlloc(SASSimpleStack_t stack, block_size_t alloc_size)
Atomically allocate a sub range of a SAS Simple Stack as a push down stack.
__C__ int SASSimpleStackDeallocNoLock(SASSimpleStack_t stack, void *stack_pointer)
Deallocate a sub range of a SAS Simple Stack by reseting the stack top.
__C__ SASSimpleStack_t SASSimpleStackInit(void *heap_block, block_size_t block_size)
Initialize a shared storage block as a simple stack.
__C__ int SASSimpleStackDealloc(SASSimpleStack_t stack, void *stack_pointer)
Atomically deallocate a sub range of a SAS Simple Stack by reseting the stack top.