diff --git a/src/console_commands.h b/src/console_commands.h index 77e8ba1..a1eae80 100644 --- a/src/console_commands.h +++ b/src/console_commands.h @@ -42,7 +42,7 @@ public: bool on_connect() override { return true; }; bool on_read(const char* data, uint32_t size) override { static_cast<ConsoleCommands*>(m_owner)->process_input(m_command, data, size); return true; }; - char m_consoleReadBuf[1024] = {}; + alignas(8) char m_consoleReadBuf[1024] = {}; std::string m_command; }; diff --git a/src/merge_mining_client_tari.h b/src/merge_mining_client_tari.h index 197181b..3b265ae 100644 --- a/src/merge_mining_client_tari.h +++ b/src/merge_mining_client_tari.h @@ -100,7 +100,7 @@ private: [[nodiscard]] bool on_connect() override; [[nodiscard]] bool on_read(const char* data, uint32_t size) override; - char m_buf[BUF_SIZE]; + alignas(8) char m_buf[BUF_SIZE]; std::vector<uint8_t> m_pendingData; bool is_paired() const { return m_pairedClient && (m_pairedClient->m_resetCounter == m_pairedClientSavedResetCounter); } diff --git a/src/miner.cpp b/src/miner.cpp index ecd82c6..91f29ce 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -152,8 +152,16 @@ void Miner::run(void* data) { WorkerData* d = static_cast<WorkerData*>(data); LOGINFO(1, "worker thread " << d->m_index << '/' << d->m_count << " started"); + + char buf[16] = {}; + log::Stream s(buf); + s << "Miner " << d->m_index << '/' << d->m_count; + + set_thread_name(buf); + make_thread_background(); d->m_miner->run(d); + LOGINFO(1, "worker thread " << d->m_index << '/' << d->m_count << " stopped"); }