[Core] Added POSIX support (Experimental)
Thanks to Danman I don't think it actually compile although tried my best to correct code. Former-commit-id: c3366c2c924f7392f4d46824dafca63ecf7f1fea
This commit is contained in:
35
src/Nazara/Core/Posix/ConditionVariableImpl.hpp
Normal file
35
src/Nazara/Core/Posix/ConditionVariableImpl.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright (C) 2012 Alexandre Janniaux
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_CONDITIONVARIABLEIMPL_HPP
|
||||
#define NAZARA_CONDITIONVARIABLEIMPL_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
class NzMutexImpl;
|
||||
|
||||
class NzConditionVariableImpl
|
||||
{
|
||||
public:
|
||||
NzConditionVariableImpl();
|
||||
~NzConditionVariableImpl();
|
||||
|
||||
void Signal();
|
||||
void SignalAll();
|
||||
|
||||
void Wait(NzMutexImpl* mutex);
|
||||
bool Wait(NzMutexImpl* mutex, nzUInt32 timeout);
|
||||
|
||||
private:
|
||||
pthread_cond_t m_cv;
|
||||
};
|
||||
|
||||
#endif // NAZARA_CONDITIONVARIABLEIMPL_HPP
|
||||
Reference in New Issue
Block a user