Loading...
Searching...
No Matches
sassimplestack.h
Go to the documentation of this file.
/*
* Copyright (c) 2005-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_SIMPLE_STACK_H
#define __SAS_SIMPLE_STACK_H
#include "sastype.h"
typedef void *SASSimpleStack_t;
#ifdef __cplusplus
#define __C__ "C"
#else
#define __C__
#endif
extern __C__ SASSimpleStack_t
SASSimpleStackInit (void *heap_block, block_size_t block_size);
extern __C__ SASSimpleStack_t
SASSimpleStackCreate (block_size_t stack_size);
extern __C__ int
SASSimpleStackDestroy (SASSimpleStack_t stack);
extern __C__ block_size_t
SASSimpleStackFreeSpace (SASSimpleStack_t stack);
extern __C__ void *
SASSimpleStackAlloc (SASSimpleStack_t stack, block_size_t alloc_size);
extern __C__ void *
SASSimpleStackNearAlloc (void *near_stack, block_size_t alloc_size);
extern __C__ int
SASSimpleStackDealloc (SASSimpleStack_t stack, void* stack_pointer);
extern __C__ int
SASSimpleStackDestroyNoLock (SASSimpleStack_t stack);
extern __C__ block_size_t
SASSimpleStackFreeSpaceNoLock (SASSimpleStack_t stack);
extern __C__ void *
SASSimpleStackAllocNoLock (SASSimpleStack_t stack, block_size_t alloc_size);
extern __C__ void *
SASSimpleStackNearAllocNoLock (void *near_stack, block_size_t alloc_size);
extern __C__ int
SASSimpleStackDeallocNoLock (SASSimpleStack_t stack, void* stack_pointer);
#endif /* __SAS_SIMPLE_STACK_H */
__C__
#define __C__
ignore this macro behind the curtain
Definition sasmsync.h:32
SASSimpleStackAllocNoLock
__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.
SASSimpleStackInit
__C__ SASSimpleStack_t SASSimpleStackInit(void *heap_block, block_size_t block_size)
Initialize a shared storage block as a simple stack.
SASSimpleStackFreeSpaceNoLock
__C__ block_size_t SASSimpleStackFreeSpaceNoLock(SASSimpleStack_t stack)
Return the block free space not currently allocated to the stack.
SASSimpleStackDealloc
__C__ int SASSimpleStackDealloc(SASSimpleStack_t stack, void *stack_pointer)
Atomically deallocate a sub range of a SAS Simple Stack by reseting the stack top.
SASSimpleStack_t
void * SASSimpleStack_t
Handle to SAS Simple Stack.
Definition sassimplestack.h:28
SASSimpleStackDeallocNoLock
__C__ int SASSimpleStackDeallocNoLock(SASSimpleStack_t stack, void *stack_pointer)
Deallocate a sub range of a SAS Simple Stack by reseting the stack top.
SASSimpleStackCreate
__C__ SASSimpleStack_t SASSimpleStackCreate(block_size_t stack_size)
Allocate a SAS block as a simple stack.
SASSimpleStackAlloc
__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.
SASSimpleStackFreeSpace
__C__ block_size_t SASSimpleStackFreeSpace(SASSimpleStack_t stack)
Return the block free space not currently allocated to the stack.
SASSimpleStackNearAlloc
__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.
SASSimpleStackNearAllocNoLock
__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.
SASSimpleStackDestroy
__C__ int SASSimpleStackDestroy(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.
SASSimpleStackDestroyNoLock
__C__ int SASSimpleStackDestroyNoLock(SASSimpleStack_t stack)
Destroy a SASSimpleStack_t and free the shared storage block.