Files
NazaraEngine/include/Nazara/Core/ThreadSafety.hpp
Gawaboumga c163d65da7 Documentation for Thread
Former-commit-id: b33bbdf473792ddcde8ffbe310722d83a1a12bcf
2016-02-21 14:29:03 +01:00

24 lines
820 B
C++

// Copyright (C) 2015 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
// No header guard
#include <Nazara/Core/LockGuard.hpp>
#include <Nazara/Core/Mutex.hpp>
// These macroes can change for any file which uses it in the same unit of compilation
#undef NazaraLock
#undef NazaraMutex
#undef NazaraMutexAttrib
#undef NazaraMutexLock
#undef NazaraMutexUnlock
#undef NazaraNamedLock
#define NazaraLock(mutex) Nz::LockGuard lock_mutex(mutex);
#define NazaraMutex(name) Nz::Mutex name;
#define NazaraMutexAttrib(name, attribute) attribute Mutex name;
#define NazaraMutexLock(mutex) mutex.Lock();
#define NazaraMutexUnlock(mutex) mutex.Unlock();
#define NazaraNamedLock(mutex, name) Nz::LockGuard lock_##name(mutex);