aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/crypto.h
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-03-11 12:25:28 +0000
committerHoward Chu <hyc@symas.com>2016-03-11 15:09:50 +0000
commitb937a2c915861900d047d4d4a24af31c454e3540 (patch)
treeceedf9b256b9769f72cb34319e4144ae127543dc /src/crypto/crypto.h
parentMerge pull request #705 (diff)
downloadmonero-b937a2c915861900d047d4d4a24af31c454e3540.tar.xz
Use boost::thread instead of std::thread
and all other associated IPC
Diffstat (limited to 'src/crypto/crypto.h')
-rw-r--r--src/crypto/crypto.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
index 360b571f3..883aa521a 100644
--- a/src/crypto/crypto.h
+++ b/src/crypto/crypto.h
@@ -31,7 +31,8 @@
#pragma once
#include <cstddef>
-#include <mutex>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_guard.hpp>
#include <vector>
#include "common/pod-class.h"
@@ -44,7 +45,7 @@ namespace crypto {
#include "random.h"
}
- extern std::mutex random_lock;
+ extern boost::mutex random_lock;
#pragma pack(push, 1)
POD_CLASS ec_point {
@@ -121,7 +122,7 @@ namespace crypto {
template<typename T>
typename std::enable_if<std::is_pod<T>::value, T>::type rand() {
typename std::remove_cv<T>::type res;
- std::lock_guard<std::mutex> lock(random_lock);
+ boost::lock_guard<boost::mutex> lock(random_lock);
generate_random_bytes(sizeof(T), &res);
return res;
}