diff options
author | luigi1111 <luigi1111w@gmail.com> | 2023-01-11 12:10:02 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2023-01-11 12:10:02 -0500 |
commit | 451ff7bd91c68cc9861711fbd45587a388df77dc (patch) | |
tree | 6b2ce08f5883fc664021587aed1d806949851cb6 /src/cryptonote_basic/miner.cpp | |
parent | Merge pull request #8671 (diff) | |
parent | Bump WINVER to 0x0600 (Windows Vista) (diff) | |
download | monero-451ff7bd91c68cc9861711fbd45587a388df77dc.tar.xz |
Merge pull request #8677
fe8522c Bump WINVER to 0x0600 (Windows Vista) (SChernykh) dab7d01 Refactored rx-slow-hash.c (SChernykh)
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_basic/miner.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 5b0db9518..98f1555b6 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -82,6 +82,7 @@ using namespace epee; #include "miner.h" +#include "crypto/hash.h" extern "C" void slow_hash_allocate_state(); @@ -436,7 +437,6 @@ namespace cryptonote { m_stop = true; } - extern "C" void rx_stop_mining(void); //----------------------------------------------------------------------------------------------------- bool miner::stop() { @@ -469,7 +469,6 @@ namespace cryptonote MINFO("Mining has been stopped, " << m_threads.size() << " finished" ); m_threads.clear(); m_threads_autodetect.clear(); - rx_stop_mining(); return true; } //----------------------------------------------------------------------------------------------------- @@ -524,6 +523,8 @@ namespace cryptonote bool miner::worker_thread() { const uint32_t th_local_index = m_thread_index++; // atomically increment, getting value before increment + crypto::rx_set_miner_thread(th_local_index, tools::get_max_concurrency()); + MLOG_SET_THREAD_NAME(std::string("[miner ") + std::to_string(th_local_index) + "]"); MGINFO("Miner thread was started ["<< th_local_index << "]"); uint32_t nonce = m_starter_nonce + th_local_index; |