// gfaipc.h :
//

#if !defined(AGD_GFAIPC_H__6126047E_C1B1_4ACE_BD49_8780C7E5E068__INCLUDED_)
#define AGD_GFAIPC_H__6126047E_C1B1_4ACE_BD49_8780C7E5E068__INCLUDED_

#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif	//	__cplusplus

/////////////////////////////////////////////////////////////////////////////
// gfaipc.h - Declarations:

typedef void				*HSHM;

HSHM	GfaIpcAcquireSHM	(const char *pszUuid, size_t nSizeElement, size_t nCntElements, const char *pszDescName);
void	GfaIpcReleaseSHM	(HSHM hShm);
void*	GfaIpcAcquirePointer(HSHM hShm);
void	GfaIpcReleasePointer(HSHM hShm, const void *p);
void	GfaIpcLockSHM		(HSHM hShm);
void	GfaIpcUnlockSHM		(HSHM hShm);
void	GfaIpcDumpSHMROT	(void);

long	GfaIpcInterlockedIncrement(HSHM hShm, volatile long *pl);
long	GfaIpcInterlockedDecrement(HSHM hShm, volatile long *pl);
long	GfaIpcInterlockedCompare(HSHM hShm, volatile long *pl, long comparand);
long	GfaIpcInterlockedSet(HSHM hShm, volatile long *pl, long val);
long	GfaIpcInterlockedClear(HSHM hShm, volatile long *pl);

/////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif	//	__cplusplus
#endif	//	!defined(AGD_GFAIPC_H__6126047E_C1B1_4ACE_BD49_8780C7E5E068__INCLUDED_)
