diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-03-11 20:15:10 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-03-11 20:15:10 +0200 |
commit | dfd0e9c97d80c5cd7115d6cbb49cce08168071b6 (patch) | |
tree | 7bb5c56c18c83f3180101e310198cb3e3fdf1ab7 /src/crypto/crypto.h | |
parent | Merge pull request #711 (diff) | |
parent | Need to link boost::chrono in more places now (diff) | |
download | monero-dfd0e9c97d80c5cd7115d6cbb49cce08168071b6.tar.xz |
Merge pull request #712
66c2fc7 Need to link boost::chrono in more places now (Howard Chu)
b937a2c Use boost::thread instead of std::thread (Howard Chu)
Diffstat (limited to 'src/crypto/crypto.h')
-rw-r--r-- | src/crypto/crypto.h | 7 |
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; } |