Shared Persistent Heap Data Environment Manual 1.4.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
28typedef void *SASSimpleStack_t;
29
31#ifdef __cplusplus
32#define __C__ "C"
33#else
34#define __C__
35#endif
36
50SASSimpleStackInit (void *heap_block, block_size_t block_size);
51
63SASSimpleStackCreate (block_size_t stack_size);
64
74extern __C__ int
76
82extern __C__ block_size_t
84
92extern __C__ void *
93SASSimpleStackAlloc (SASSimpleStack_t stack, block_size_t alloc_size);
94
105extern __C__ void *
106SASSimpleStackNearAlloc (void *near_stack, block_size_t alloc_size);
107
115extern __C__ int
116SASSimpleStackDealloc (SASSimpleStack_t stack, void* stack_pointer);
117
125extern __C__ int
127
133extern __C__ block_size_t
135
142extern __C__ void *
143SASSimpleStackAllocNoLock (SASSimpleStack_t stack, block_size_t alloc_size);
144
154extern __C__ void *
155SASSimpleStackNearAllocNoLock (void *near_stack, block_size_t alloc_size);
156
164extern __C__ int
166
167#endif /* __SAS_SIMPLE_STACK_H */
__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__ SASSimpleStack_t SASSimpleStackInit(void *heap_block, block_size_t block_size)
Initialize a shared storage block as a simple 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__ int SASSimpleStackDealloc(SASSimpleStack_t stack, void *stack_pointer)
Atomically deallocate a sub range of a SAS Simple Stack by reseting the stack top.
void * SASSimpleStack_t
Handle to SAS Simple Stack.
Definition: sassimplestack.h:28
__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 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__ block_size_t SASSimpleStackFreeSpace(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__ 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__ int SASSimpleStackDestroy(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.
__C__ int SASSimpleStackDestroyNoLock(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.