Shared Persistent Heap Data Environment Manual  1.1.0
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006-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  *
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  */
12 #ifndef __SPH_CONTEXT_H
13 #define __SPH_CONTEXT_H
41 #include "sastype.h"
42 #include "sasstringbtreeenum.h"
48 typedef void *SPHContext_t;
50 #ifdef __cplusplus
51 #define __C__ "C"
52 #else
53 #define __C__
54 #endif
70 extern __C__ SPHContext_t
71 SPHContextInit (void *heap_block , sas_type_t sasType,
72  block_size_t heap_size);
83 extern __C__ SPHContext_t
84 SPHContextCreate (block_size_t heap_size);
93 extern __C__ int
113 extern __C__ int
114 SPHContextAddName (SPHContext_t contxt, char *name, void *value);
130 extern __C__ int
131 SPHContextRename (SPHContext_t contxt, char *oldname, char *newname, void *value);
157 extern __C__ void*
158 SPHContextFindByName (SPHContext_t contxt, char *name);
169 extern __C__ void*
170 SPHContextFindByAddr (SPHContext_t contxt, void *value);
182 extern __C__ int
183 SPHContextRemoveByName (SPHContext_t contxt, char *name);
194 extern __C__ int
195 SPHContextRemoveByAddr (SPHContext_t contxt, void *value);
205 extern __C__ block_size_t
231 extern __C__ SPHContext_t
232 SPHSetupProjectContext(char *project_name);
244 extern __C__ SPHContext_t
245 SPHSetupAltProjectContext(char *project_name);
257 extern __C__ SPHContext_t
258 SPHRemoveProjectContext(char *project_name);
269 extern __C__ int
270 SPHDestroyProjectContext(char *project_name);
281 extern __C__ SPHContext_t
282 getProjectContextByName(char *project_name);
288 extern __C__ SPHContext_t
291 #endif /* __SPH_CONTEXT_H */
__C__ int SPHContextAddName(SPHContext_t contxt, char *name, void *value)
Add a name/address mapping to this context.
void * SASStringBTreeEnum_t
Handle to an instance of String BTree Enumeration.
Definition: sasstringbtreeenum.h:113
__C__ int SPHDestroyProjectContext(char *project_name)
Remove an existing project context from the root and destroy that project context.
__C__ SASStringBTreeEnum_t SPHContextGetNameEnum(SPHContext_t contxt)
Create a SASStringBTreeEnum_t enumeration that can used to iterate over the name space of this contex...
__C__ SPHContext_t getCurrentProjectContext()
return the address of the current project context.
__C__ int SPHContextDestroy(SPHContext_t contxt)
Destroy a name/address mapping context and free the shared storage block.
__C__ SPHContext_t SPHRemoveProjectContext(char *project_name)
Remove an existing project context from the root and return the named project context. The project context is not destroyed.
__C__ SPHContext_t SPHSetupProjectContext(char *project_name)
Setup the root and named project contexts. A project context is just a second level context named in ...
void * SPHContext_t
Handle to an instance of SPH Context.
Definition: sphcontext.h:48
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
__C__ SPHContext_t SPHSetupAltProjectContext(char *project_name)
Setup root and named project contexts. A project context is just a second level context named in the ...
__C__ block_size_t SPHContextFreeSpace(SPHContext_t contxt)
Return the remaining free space within the specified context.
__C__ SPHContext_t SPHContextInit(void *heap_block, sas_type_t sasType, block_size_t heap_size)
Initialize a shared storage block as a name/address mapping context.
__C__ int SPHContextRename(SPHContext_t contxt, char *oldname, char *newname, void *value)
Replace the existing "old name" with a "new name" string for the associated address value in this con...
__C__ void * SPHContextFindByName(SPHContext_t contxt, char *name)
Find the address value associated with a name within a specific context.
__C__ SPHContext_t getProjectContextByName(char *project_name)
return the address of the named project context.
__C__ void * SPHContextFindByAddr(SPHContext_t contxt, void *value)
Find the name associated with an address value within a specific context.
__C__ SPHContext_t SPHContextCreate(block_size_t heap_size)
Create a name/address mapping context..
__C__ int SPHContextRemoveByName(SPHContext_t contxt, char *name)
Remove a name/address association by matching name for the specified context.
__C__ int SPHContextRemoveByAddr(SPHContext_t contxt, void *value)
Remove a name/address associations by matching address value for the specified context.
An enumeration over a Shared Address Space, C String BTree index for shared memory multi-thread/multi...