Fixes.
Former-commit-id: 85f7bb85e33acdd84d19191c845a1cc59bbb2138
This commit is contained in:
parent
22d9e98422
commit
cb5c8d7bdc
|
|
@ -2,7 +2,7 @@
|
||||||
// This file is part of the "Nazara Engine - Core module"
|
// This file is part of the "Nazara Engine - Core module"
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// 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/DynLib.hpp>
|
||||||
#include <Nazara/Core/Error.hpp>
|
#include <Nazara/Core/Error.hpp>
|
||||||
#include <Nazara/Core/String.hpp>
|
#include <Nazara/Core/String.hpp>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include <Nazara/Core/Posix/FileImpl.hpp>
|
#include <Nazara/Core/Posix/FileImpl.hpp>
|
||||||
#include <Nazara/Core/Error.hpp>
|
#include <Nazara/Core/Error.hpp>
|
||||||
#include <Nazara/Core/Win32/Time.hpp>
|
#include <Nazara/Core/Posix/Time.hpp>
|
||||||
#include <Nazara/Core/Debug.hpp>
|
#include <Nazara/Core/Debug.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@
|
||||||
#ifndef NAZARA_FILEIMPL_HPP
|
#ifndef NAZARA_FILEIMPL_HPP
|
||||||
#define NAZARA_FILEIMPL_HPP
|
#define NAZARA_FILEIMPL_HPP
|
||||||
|
|
||||||
|
#ifndef _LARGEFILE64_SOURCE
|
||||||
#define _LARGEFILE64_SOURCE
|
#define _LARGEFILE64_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Core/File.hpp>
|
#include <Nazara/Core/File.hpp>
|
||||||
|
|
|
||||||
|
|
@ -2,31 +2,31 @@
|
||||||
// This file is part of the "Nazara Engine - Core module"
|
// This file is part of the "Nazara Engine - Core module"
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// 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>
|
#include <Nazara/Core/Debug.hpp>
|
||||||
|
|
||||||
NzMutexImpl::NzMutexImpl()
|
NzMutexImpl::NzMutexImpl()
|
||||||
{
|
{
|
||||||
|
|
||||||
pthread_mutex_init(&m_pmutex, NULL);
|
pthread_mutex_init(&m_handle, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
NzMutexImpl::~NzMutexImpl()
|
NzMutexImpl::~NzMutexImpl()
|
||||||
{
|
{
|
||||||
pthread_mutex_
|
pthread_mutex_destroy(&m_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzMutexImpl::Lock()
|
void NzMutexImpl::Lock()
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&m_pmutex);
|
pthread_mutex_lock(&m_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NzMutexImpl::TryLock()
|
bool NzMutexImpl::TryLock()
|
||||||
{
|
{
|
||||||
pthread_mutex_trylock(&m_pmutex) == 0;
|
pthread_mutex_trylock(&m_handle) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzMutexImpl::Unlock()
|
void NzMutexImpl::Unlock()
|
||||||
{
|
{
|
||||||
pthread_mutex_unlock(&m_pmutex);
|
pthread_mutex_unlock(&m_handle);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class NzMutexImpl
|
||||||
void Unlock();
|
void Unlock();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
pthread_mutex_t m_pmutex;
|
pthread_mutex_t m_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NAZARA_MUTEXIMPL_HPP
|
#endif // NAZARA_MUTEXIMPL_HPP
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue