Shared Persistent Heap Data Environment Manual 1.4.0
sphcontext.h
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 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation, Steven Munroe - initial API and implementation
10 */
11
12#ifndef __SPH_CONTEXT_H
13#define __SPH_CONTEXT_H
14
41#include "sastype.h"
42#include "sasstringbtreeenum.h"
43
48typedef void *SPHContext_t;
49
50#ifdef __cplusplus
51#define __C__ "C"
52#else
53#define __C__
54#endif
55
70extern __C__ SPHContext_t
71SPHContextInit (void *heap_block , sas_type_t sasType,
72 block_size_t heap_size);
73
83extern __C__ SPHContext_t
84SPHContextCreate (block_size_t heap_size);
85
93extern __C__ int
95
113extern __C__ int
114SPHContextAddName (SPHContext_t contxt, char *name, void *value);
115
130extern __C__ int
131SPHContextRename (SPHContext_t contxt, char *oldname, char *newname, void *value);
132
147
157extern __C__ void*
159
169extern __C__ void*
170SPHContextFindByAddr (SPHContext_t contxt, void *value);
171
182extern __C__ int
184
194extern __C__ int
196
205extern __C__ block_size_t
207
231extern __C__ SPHContext_t
232SPHSetupProjectContext(char *project_name);
233
244extern __C__ SPHContext_t
245SPHSetupAltProjectContext(char *project_name);
246
257extern __C__ SPHContext_t
258SPHRemoveProjectContext(char *project_name);
259
269extern __C__ int
270SPHDestroyProjectContext(char *project_name);
271
281extern __C__ SPHContext_t
282getProjectContextByName(char *project_name);
283
288extern __C__ SPHContext_t
290
291#endif /* __SPH_CONTEXT_H */
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
An enumeration over a Shared Address Space, C String BTree index for shared memory multi-thread/multi...
void * SASStringBTreeEnum_t
Handle to an instance of String BTree Enumeration.
Definition: sasstringbtreeenum.h:113
__C__ int SPHContextRemoveByAddr(SPHContext_t contxt, void *value)
Remove a name/address associations by matching address value for the specified 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__ SPHContext_t getProjectContextByName(char *project_name)
return the address of the named project context.
__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__ int SPHContextRemoveByName(SPHContext_t contxt, char *name)
Remove a name/address association by matching name for the specified context.
__C__ int SPHContextAddName(SPHContext_t contxt, char *name, void *value)
Add a name/address mapping to this context.
__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 ...
__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__ void * SPHContextFindByAddr(SPHContext_t contxt, void *value)
Find the name associated with an address value within a specific context.
__C__ int SPHDestroyProjectContext(char *project_name)
Remove an existing project context from the root and destroy that project context.
__C__ SPHContext_t SPHRemoveProjectContext(char *project_name)
Remove an existing project context from the root and return the named project context....
__C__ void * SPHContextFindByName(SPHContext_t contxt, char *name)
Find the address value associated with a name within a specific 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.
void * SPHContext_t
Handle to an instance of SPH Context.
Definition: sphcontext.h:48
__C__ SPHContext_t SPHContextCreate(block_size_t heap_size)
Create a name/address mapping context..
__C__ int SPHContextDestroy(SPHContext_t contxt)
Destroy a name/address mapping context and free the shared storage block.