Shared Persistent Heap Data Environment Manual 1.4.0
Loading...
Searching...
No Matches
sphlogportal.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-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_LOG_PORTAL_H
13#define __SPH_LOG_PORTAL_H
14
38#include "sastype.h"
39#include "sphlflogger.h"
40
45typedef void *SPHLogPortal_t;
46
47#ifdef __cplusplus
48#define __C__ "C"
49#else
50#define __C__
51#endif
52
74
88SPHLogPortalInit (void* buf_seg, block_size_t buf_size);
89
100SPHLogPortalCreate (block_size_t buf_size);
101
108extern __C__ int
110
116extern __C__ int
118
124extern __C__ int
126
139extern __C__ SPHLFLogger_t
141
150extern __C__ SPHLFLogger_t
152
162extern __C__ SPHLFLogger_t
164
172extern __C__ int
174
191 int catcode, int subcode,
192 SPHLFLoggerHandle_t *handlespace);
193
212 int catcode, int subcode,
213 block_size_t alloc_size,
214 SPHLFLoggerHandle_t *handlespace);
215
234 SPHLFPortalIterator_t *iteratorSpace);
235
258 SPHLFLoggerHandle_t *handlespace);
259
272extern __C__ void *
274 block_size_t alloc_size);
275
283extern __C__ int
285
286#endif /* __SPH_LOG_PORTAL_H */
#define __C__
ignore this macro behind the curtain
Definition sasmsync.h:32
Shared Persistent Heap, logger. For shared memory multi-thread/multi-core applications....
void * SPHLFLogger_t
Handle to an instance of SPH Lock Free Logger.
Definition sphlflogger.h:173
unsigned long longPtr_t
unsigned int type, consistent with the size of a pointer and used for pointer calculations
Definition sphlflogger.h:183
__C__ SPHLFLoggerHandle_t * SPHLogPortalAllocStrideTimeStamped(SPHLogPortal_t portal, int catcode, int subcode, SPHLFLoggerHandle_t *handlespace)
Return the handle of a Logger entry allocated from the current logger of the Portal....
__C__ int SPHLogPortalEntries(SPHLogPortal_t portal)
Return the number of active Loggers in the portal list.
__C__ SPHLogPortal_t SPHLogPortalInit(void *buf_seg, block_size_t buf_size)
Initialize a shared storage block as a Log Portal.
__C__ SPHLogPortal_t SPHLogPortalCreate(block_size_t buf_size)
Allocate and initialize a shared storage block as a Log Portal.
__C__ SPHLFPortalIterator_t * SPHLFPortalCreateIterator(SPHLogPortal_t portal, SPHLFPortalIterator_t *iteratorSpace)
Create an iterator positioned at the first entry of the first logger attached to this portal.
void * SPHLogPortal_t
Handle to an instance of SPH Log Portal.
Definition sphlogportal.h:45
__C__ SPHLFLoggerHandle_t * SPHLogPortalAllocTimeStamped(SPHLogPortal_t portal, int catcode, int subcode, block_size_t alloc_size, SPHLFLoggerHandle_t *handlespace)
Return the handle of a Logger entry allocated from the current logger of the Portal....
__C__ void * SPHLogPortalAllocRaw(SPHLogPortal_t portal, block_size_t alloc_size)
Return the address of a (raw) Logger entry allocated from the current logger.
__C__ SPHLFLogger_t SPHLogPortalGetCurrentLogger(SPHLogPortal_t portal)
Return the handle of the current Logger target of the Portal.
__C__ int SPHLogPortalDestroy(SPHLogPortal_t portal)
Destroy the Log Portal and free the storage.
__C__ SPHLFLogger_t SPHLogPortalGetLoggerByIndex(SPHLogPortal_t portal, longPtr_t index)
Return the handle of the Logger in the Portal list slot specified by the index number.
__C__ SPHLFLogger_t SPHLogPortalAddLogger(SPHLogPortal_t portal, SPHLFLogger_t log)
Insert a SPHLFLogger_t into the next free slot og this Log Portal. This Logger can be then be used to...
__C__ int SPHLogPortalCapacity(SPHLogPortal_t portal)
Return the maximum number of Loggers the list can hold.
__C__ int SPHLogPortalGetCurrentIndex(SPHLogPortal_t portal)
Return the index of the current Logger target of the Portal.
__C__ int SPHLogPortalEmpty(SPHLogPortal_t portal)
Return the status of the specified Log Portal.
__C__ SPHLFLoggerHandle_t * SPHLFPortalIteratorNext(SPHLFPortalIterator_t *iterator, SPHLFLoggerHandle_t *handlespace)
Access a sequence of completed logger entries in-order.
Instance of a Lock Free Logger Iterator.
Definition sphlflogger.h:264
Instance of a Lock Free Logger Entry Handle.
Definition sphlflogger.h:244
Instance of a Log Portal Iterator.
Definition sphlogportal.h:62
SPHLFLogIterator_t logIter
Definition sphlogportal.h:64
longPtr_t current
Definition sphlogportal.h:68
longPtr_t capacity
Definition sphlogportal.h:72
longPtr_t next_free
Definition sphlogportal.h:70
SPHLogPortal_t portal
Definition sphlogportal.h:66