SDK: Fix data races on the local semaphores

This commit is contained in:
Dennis Klein
2019-09-01 15:44:52 +02:00
committed by Dennis Klein
parent 5d6184cd1a
commit 1c49dde668
5 changed files with 22 additions and 21 deletions

View File

@@ -39,7 +39,7 @@ auto Semaphore::Signal() -> void
fCv.notify_one();
}
auto Semaphore::GetCount() -> std::size_t
auto Semaphore::GetCount() const -> std::size_t
{
std::unique_lock<std::mutex> lk(fMutex);
return fCount;
@@ -63,7 +63,7 @@ auto SharedSemaphore::Signal() -> void
fSemaphore->Signal();
}
auto SharedSemaphore::GetCount() -> std::size_t
auto SharedSemaphore::GetCount() const -> std::size_t
{
return fSemaphore->GetCount();
}