34 lines
600 B
C
34 lines
600 B
C
//
|
|
// Created by Cigerxwin Chaker on 05.11.19.
|
|
//
|
|
|
|
#ifndef LIBRARY_SHAREDMEMORYACCESSS_H
|
|
#define LIBRARY_SHAREDMEMORYACCESSS_H
|
|
|
|
|
|
/**
|
|
* use lock and unlock when writing
|
|
* @return pointer to the shared memory
|
|
*/
|
|
char *getSharedMemory();
|
|
|
|
/**
|
|
*
|
|
* @return the size of the shared memory
|
|
*/
|
|
int getSharedMemorySize();
|
|
|
|
void lockSharedMemory();
|
|
|
|
void unlockSharedMemory();
|
|
|
|
/**
|
|
*
|
|
* @param data poiter to data
|
|
* @param size of data
|
|
* @param offset where the data is written on the shared memory
|
|
*/
|
|
void writeSharedMemory(char *data, int size, int offset);
|
|
|
|
#endif //LIBRARY_SHAREDMEMORYACCESSS_H
|