ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcppShMem.c File Reference
#include <ngc/core/ngcpp.h>

Classes

struct  SHDATA_T
 

Functions

int ngcppShDataAttach (int shared, int n, size_t size, char *erms)
 
int ngcppShDataClose (void)
 
int ngcppShDataGetPtr (char **ptr, int id, int len, char *erms)
 
char * ngcppShDataSetPtr (int id, int *len, char *erms)
 
void ngcppShDataSwap (int id)
 
int ngcppShDataValid (int id)
 
int ngcppShDataInvalid (int id)
 
int ngcppShDataIsValid (int id)
 

Variables

int ngcppKeyVal = (key_t) 0x01000000
 

Detailed Description

Function Documentation

◆ ngcppShDataAttach()

int ngcppShDataAttach ( int shared,
int n,
size_t size,
char * erms )

Attach to a memory data structure. If the shared flag is set the memory area is placed in shared memory.

◆ ngcppShDataClose()

int ngcppShDataClose ( void )

Remove the attached shared memory data structure.

◆ ngcppShDataGetPtr()

int ngcppShDataGetPtr ( char ** ptr,
int id,
int len,
char * erms )

Return a pointer to the mirror of a shared memory data entry identified by id. The parameter len returns the maximum length of the dataset.

◆ ngcppShDataInvalid()

int ngcppShDataInvalid ( int id)

Mark an entry as not containing valid data.

◆ ngcppShDataIsValid()

int ngcppShDataIsValid ( int id)

Return 1 in case the data set contains valid data.

◆ ngcppShDataSetPtr()

char * ngcppShDataSetPtr ( int id,
int * len,
char * erms )

Return in a pointer to the mirror of a shared memory data entry identified by id. The parameter len returns the maximum length of the dataset.

◆ ngcppShDataSwap()

void ngcppShDataSwap ( int id)

Swap all datasets matching id (id can be or'ed).

◆ ngcppShDataValid()

int ngcppShDataValid ( int id)

Mark an entry as containing valid data.

Variable Documentation

◆ ngcppKeyVal

int ngcppKeyVal = (key_t) 0x01000000

Shared memory key