Backported Pro shared_memory edits to OS edition

This commit is contained in:
Thulinma 2016-02-15 14:42:19 +01:00
parent 243595ff4d
commit 0d9108d1d6
2 changed files with 165 additions and 66 deletions

View file

@ -69,6 +69,8 @@ namespace IPC {
void unlink();
private:
#if defined(__CYGWIN__) || defined(_WIN32)
///\todo Maybe sometime implement anything else than 777
static SECURITY_ATTRIBUTES getSecurityAttributes();
HANDLE mySem;
#else
sem_t * mySem;
@ -228,4 +230,15 @@ namespace IPC {
///\brief Whether the payload has a counter, if so, it is added in front of the payload
bool hasCounter;
};
class userConnection {
public:
userConnection(char * _data);
unsigned long getTrackId(size_t offset) const;
void setTrackId(size_t offset, unsigned long trackId) const;
unsigned long getKeynum(size_t offset) const;
void setKeynum(size_t offset, unsigned long keynum);
private:
char * data;
};
}