1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

Compare commits

..

10 Commits

Author SHA1 Message Date
XMRig
fd029201b0 v2.4.2. 2017-10-23 15:32:07 +03:00
xmrig
a7c0ba6d28 Update CHANGELOG.md 2017-10-23 14:10:37 +03:00
XMRig
66e9f5a8bf Merge branch 'vcambur-master' 2017-10-20 19:55:03 +03:00
XMRig
10df3ec227 Code style fixes for FreeBSD support pull request. 2017-10-20 19:54:18 +03:00
vcambur
9c0fe73102 Some FreeBSD fixes 2017-10-20 08:41:08 +00:00
XMRig
1af1ba6b5f #153 Force reconnect when duplicated job received. 2017-10-16 01:26:55 +03:00
XMRig
bea3bc74b2 v2.4.1. 2017-10-15 04:52:00 +03:00
xmrig
7e4d0d83ff Update CHANGELOG.md 2017-10-15 03:42:45 +03:00
xmrig
4138d4a178 Update README.md 2017-10-12 22:40:20 +03:00
XMRig
f9202c6951 #147 Fixed comparability with monero-stratum. 2017-10-10 16:31:19 +03:00
9 changed files with 39 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
# v2.4.2
- [#60](https://github.com/xmrig/xmrig/issues/60) Added FreeBSD support, thanks [vcambur](https://github.com/vcambur).
- [#153](https://github.com/xmrig/xmrig/issues/153) Fixed issues with dwarfpool.com.
# v2.4.1
- [#147](https://github.com/xmrig/xmrig/issues/147) Fixed comparability with monero-stratum.
# v2.4.0
- Added [HTTP API](https://github.com/xmrig/xmrig/wiki/API).
- Added comments support in config file.

View File

@@ -133,6 +133,10 @@ else()
set(EXTRA_LIBS pthread)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(EXTRA_LIBS ${EXTRA_LIBS} kvm)
endif()
add_definitions(/D__STDC_FORMAT_MACROS)
add_definitions(/DUNICODE)
add_definitions(/DRAPIDJSON_SSE2)

View File

@@ -3,6 +3,7 @@ XMRig is high performance Monero (XMR) CPU miner, with the official full Windows
Originally based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of legacy code, since version 1.0.0 complete rewritten from scratch on C++.
* This is the CPU-mining version, there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia).
* [Roadmap](https://github.com/xmrig/xmrig/issues/106) for next releases.
<img src="http://i.imgur.com/OKZRVDh.png" width="619" >

View File

@@ -22,6 +22,14 @@
*/
#ifdef __FreeBSD__
# include <sys/types.h>
# include <sys/param.h>
# include <sys/cpuset.h>
# include <pthread_np.h>
#endif
#include <pthread.h>
#include <sched.h>
#include <unistd.h>
@@ -31,6 +39,11 @@
#include "Cpu.h"
#ifdef __FreeBSD__
typedef cpuset_t cpu_set_t;
#endif
void Cpu::init()
{
# ifdef XMRIG_NO_LIBCPUID
@@ -53,7 +66,9 @@ void Cpu::setAffinity(int id, uint64_t mask)
}
if (id == -1) {
# ifndef __FreeBSD__
sched_setaffinity(0, sizeof(&set), &set);
# endif
} else {
pthread_setaffinity_np(pthread_self(), sizeof(&set), &set);
}

View File

@@ -51,10 +51,11 @@ bool Mem::allocate(int algo, int threads, bool doubleHash, bool enabled)
# if defined(__APPLE__)
m_memory = static_cast<uint8_t*>(mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, VM_FLAGS_SUPERPAGE_SIZE_2MB, 0));
# elif defined(__FreeBSD__)
m_memory = static_cast<uint8_t*>(mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_ALIGNED_SUPER | MAP_PREFAULT_READ, -1, 0));
# else
m_memory = static_cast<uint8_t*>(mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0));
# endif
if (m_memory == MAP_FAILED) {
m_memory = static_cast<uint8_t*>(_mm_malloc(size, 16));
return true;

View File

@@ -21,7 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sched.h>
#include <stdlib.h>
#include <string.h>
@@ -116,6 +115,7 @@ void Platform::setThreadPriority(int priority)
setpriority(PRIO_PROCESS, 0, prio);
# ifdef SCHED_IDLE
if (priority == 0) {
sched_param param;
param.sched_priority = 0;
@@ -124,4 +124,5 @@ void Platform::setThreadPriority(int priority)
sched_setscheduler(0, SCHED_BATCH, &param);
}
}
# endif
}

View File

@@ -220,7 +220,11 @@ bool Client::parseJob(const rapidjson::Value &params, int *code)
}
if (m_job == job) {
LOG_WARN("[%s:%u] duplicate job received, ignore", m_url.host(), m_url.port());
if (!m_quiet) {
LOG_WARN("[%s:%u] duplicate job received, reconnect", m_url.host(), m_url.port());
}
close();
return false;
}

View File

@@ -63,7 +63,7 @@ public:
}
const size_t size = strlen(id);
if (size < 4 || size >= sizeof(m_data)) {
if (size >= sizeof(m_data)) {
return false;
}

View File

@@ -27,7 +27,7 @@
#define APP_ID "xmrig"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig CPU miner"
#define APP_VERSION "2.4.0"
#define APP_VERSION "2.4.2"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2017 xmrig.com"
@@ -35,7 +35,7 @@
#define APP_VER_MAJOR 2
#define APP_VER_MINOR 4
#define APP_VER_BUILD 0
#define APP_VER_BUILD 2
#define APP_VER_REV 0
#ifdef _MSC_VER