mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 23:55:08 +00:00
25 lines
673 B
C++
25 lines
673 B
C++
#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;
|
|
};
|
|
|
|
const int shmem_size = 1024 * 256; // number of chars/bytes (256kb)
|
|
|
|
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);
|
|
|
|
std::string GetWorkingDirectory(); |