ccls/platform.h

23 lines
640 B
C
Raw Normal View History

#pragma once
#include <memory>
#include <string>
struct PlatformMutex {
virtual ~PlatformMutex() {}
};
struct PlatformScopedMutexLock {
virtual ~PlatformScopedMutexLock() {}
};
struct PlatformSharedMemory {
2017-03-12 20:28:19 +00:00
virtual ~PlatformSharedMemory();
void* shared;
};
2017-03-06 08:48:51 +00:00
const int shmem_size = 1024 * 1024 * 32; // number of chars/bytes (32mb)
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();