library/src/SharedMemoryAccess.h

34 lines
600 B
C
Raw Normal View History

2019-11-06 11:05:11 +01:00
//
// Created by Cigerxwin Chaker on 05.11.19.
//
#ifndef LIBRARY_SHAREDMEMORYACCESSS_H
#define LIBRARY_SHAREDMEMORYACCESSS_H
2019-11-07 12:05:06 +01:00
/**
* use lock and unlock when writing
2019-11-07 12:05:06 +01:00
* @return pointer to the shared memory
*/
char *getSharedMemory();
2019-11-07 12:05:06 +01:00
/**
*
* @return the size of the shared memory
*/
int getSharedMemorySize();
void lockSharedMemory();
void unlockSharedMemory();
2019-11-07 12:05:06 +01:00
/**
*
* @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);
2019-11-06 11:05:11 +01:00
#endif //LIBRARY_SHAREDMEMORYACCESSS_H