ccls/src/platform.h
2017-03-24 17:40:01 -07:00

27 lines
626 B
C++

#pragma once
#include <memory>
#include <string>
struct PlatformMutex {
virtual ~PlatformMutex();
};
struct PlatformScopedMutexLock {
virtual ~PlatformScopedMutexLock();
};
struct PlatformSharedMemory {
virtual ~PlatformSharedMemory();
void* data;
size_t capacity;
std::string name;
};
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,
size_t size);
std::string GetWorkingDirectory();