// Copyright (C) 2013 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #if defined(NAZARA_PLATFORM_WINDOWS) #include #elif defined(NAZARA_PLATFORM_POSIX) #include #else #error Lack of implementation: Semaphore #endif #include NzSemaphore::NzSemaphore(unsigned int count) { m_impl = new NzSemaphoreImpl(count); } NzSemaphore::~NzSemaphore() { delete m_impl; } unsigned int NzSemaphore::GetCount() const { return m_impl->GetCount(); } void NzSemaphore::Post() { m_impl->Post(); } void NzSemaphore::Wait() { m_impl->Wait(); } bool NzSemaphore::Wait(nzUInt32 timeout) { return m_impl->Wait(timeout); }