Add a wrapper for the very basic mutex locking we make use of

This commit is contained in:
Andreas Fabri 2015-09-04 08:38:55 +02:00
parent a6c646346d
commit 52e5f3a521
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#ifndef CGAL_MUTEX_H
#define CGAL_MUTEX_H
#include <CGAL/config.h>
#ifdef BOOST_MSVC
#include <mutex>
#define CGAL_MUTEX std::mutex
#define CGAL_SCOPED_LOCK(M) std::unique_lock<std::mutex> scoped_lock(M)
#else
#include <boost/thread/mutex.hpp>
#define CGAL_MUTEX boost::mutex
#define CGAL_SCOPED_LOCK(M) boost::mutex::scoped_lock scoped_lock(M)
#endif
#endif // CGAL_MUTEX_H