aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-07-05 14:54:38 +0100
committerGitHub <noreply@github.com>2019-07-05 14:54:38 +0100
commit19cb4ca554102a70edd6b6bb6c836e1474a73d4f (patch)
tree6b19b866b4d789401c089e582b04b2fbddf063c5 /common/nextpnr.h
parent8f2813279c5888e655ee6f50f198cf8cb11b0b50 (diff)
parentbd694bda19728f17ff0a9951952e24d8a65e9bc2 (diff)
downloadnextpnr-19cb4ca554102a70edd6b6bb6c836e1474a73d4f.tar.gz
nextpnr-19cb4ca554102a70edd6b6bb6c836e1474a73d4f.tar.bz2
nextpnr-19cb4ca554102a70edd6b6bb6c836e1474a73d4f.zip
Merge pull request #300 from YosysHQ/static_build_fix
Switching from std to boost fix crash
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 3f434580..1f22e65a 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -26,13 +26,13 @@
#include <stdexcept>
#include <stdint.h>
#include <string>
-#include <thread>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <boost/functional/hash.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
#ifndef NEXTPNR_H
#define NEXTPNR_H
@@ -533,7 +533,7 @@ struct BaseCtx
{
// Lock to perform mutating actions on the Context.
std::mutex mutex;
- std::thread::id mutex_owner;
+ boost::thread::id mutex_owner;
// Lock to be taken by UI when wanting to access context - the yield()
// method will lock/unlock it when its' released the main mutex to make
@@ -583,12 +583,12 @@ struct BaseCtx
void lock(void)
{
mutex.lock();
- mutex_owner = std::this_thread::get_id();
+ mutex_owner = boost::this_thread::get_id();
}
void unlock(void)
{
- NPNR_ASSERT(std::this_thread::get_id() == mutex_owner);
+ NPNR_ASSERT(boost::this_thread::get_id() == mutex_owner);
mutex.unlock();
}