Former-commit-id: 85f7bb85e33acdd84d19191c845a1cc59bbb2138
This commit is contained in:
Alexandre Janniaux 2013-01-04 18:19:13 +01:00
parent 22d9e98422
commit cb5c8d7bdc
5 changed files with 11 additions and 9 deletions

View File

@ -2,7 +2,7 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Win32/DynLibImpl.hpp>
#include <Nazara/Core/Posix/DynLibImpl.hpp>
#include <Nazara/Core/DynLib.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/String.hpp>

View File

@ -4,7 +4,7 @@
#include <Nazara/Core/Posix/FileImpl.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/Win32/Time.hpp>
#include <Nazara/Core/Posix/Time.hpp>
#include <Nazara/Core/Debug.hpp>
#include <stdio.h>
#include <unistd.h>

View File

@ -7,7 +7,9 @@
#ifndef NAZARA_FILEIMPL_HPP
#define NAZARA_FILEIMPL_HPP
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/File.hpp>

View File

@ -2,31 +2,31 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Win32/MutexImpl.hpp>
#include <Nazara/Core/Posix/MutexImpl.hpp>
#include <Nazara/Core/Debug.hpp>
NzMutexImpl::NzMutexImpl()
{
pthread_mutex_init(&m_pmutex, NULL);
pthread_mutex_init(&m_handle, NULL);
}
NzMutexImpl::~NzMutexImpl()
{
pthread_mutex_
pthread_mutex_destroy(&m_handle);
}
void NzMutexImpl::Lock()
{
pthread_mutex_lock(&m_pmutex);
pthread_mutex_lock(&m_handle);
}
bool NzMutexImpl::TryLock()
{
pthread_mutex_trylock(&m_pmutex) == 0;
pthread_mutex_trylock(&m_handle) == 0;
}
void NzMutexImpl::Unlock()
{
pthread_mutex_unlock(&m_pmutex);
pthread_mutex_unlock(&m_handle);
}

View File

@ -27,7 +27,7 @@ class NzMutexImpl
void Unlock();
private:
pthread_mutex_t m_pmutex;
pthread_mutex_t m_handle;
};
#endif // NAZARA_MUTEXIMPL_HPP