2017-03-02 09:28:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
struct PlatformMutex {
|
|
|
|
virtual ~PlatformMutex() {}
|
|
|
|
};
|
|
|
|
struct PlatformScopedMutexLock {
|
|
|
|
virtual ~PlatformScopedMutexLock() {}
|
|
|
|
};
|
|
|
|
struct PlatformSharedMemory {
|
|
|
|
virtual ~PlatformSharedMemory() {}
|
|
|
|
|
|
|
|
size_t* shared_bytes_used;
|
|
|
|
char* shared_start;
|
|
|
|
};
|
|
|
|
|
2017-03-05 19:48:05 +00:00
|
|
|
const int shmem_size = 1024 * 256; // number of chars/bytes (256kb)
|
2017-03-02 09:28:07 +00:00
|
|
|
|
|
|
|
std::unique_ptr<PlatformMutex> CreatePlatformMutex(const std::string& name);
|
|
|
|
std::unique_ptr<PlatformScopedMutexLock> CreatePlatformScopedMutexLock(PlatformMutex* mutex);
|
|
|
|
std::unique_ptr<PlatformSharedMemory> CreatePlatformSharedMemory(const std::string& name);
|
2017-03-05 19:48:05 +00:00
|
|
|
|
|
|
|
std::string GetWorkingDirectory();
|