Working on linux now, better logging

This commit is contained in:
2026-03-26 16:38:29 +01:00
parent 5e5e89284b
commit dd96fe1f34
14 changed files with 118 additions and 11 deletions

View File

@@ -3,6 +3,10 @@
#include <string.h>
#include <stdio.h>
#ifdef __linux
#define _strdup strdup
#endif
typedef struct __shm_item__ {
ShmPlace next;
@@ -263,7 +267,7 @@ public:
_sem = sem_open(_sem_name, O_RDWR, S_IRUSR | S_IWUSR, 0);
_shm_fd = shm_open(name, O_RDWR, 0600);
}
_mem = mmap(nullptr, _size, PROT_READ|PROT_WRITE, MAP_SHARED, _shm_fd, 0);
_mem = reinterpret_cast<char *>(mmap(nullptr, _size, PROT_READ|PROT_WRITE, MAP_SHARED, _shm_fd, 0));
_slots = reinterpret_cast <ShmPlace *>(_mem + sizeof(int) + sizeof(ShmPlace) + sizeof(ShmPlace));
_used = reinterpret_cast<int *>(_mem);
@@ -341,10 +345,6 @@ class ShmSemApi {
}
free(_name);
}
};
};
public:
};
#endif