mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-10 12:41:02 +00:00
Merge branch 'master' into mr
This commit is contained in:
commit
274a40115e
@ -4983,7 +4983,9 @@ void enable_device(struct cgpu_info *cgpu)
|
|||||||
cgpu->deven = DEV_ENABLED;
|
cgpu->deven = DEV_ENABLED;
|
||||||
devices[cgpu->cgminer_id = cgminer_id_count++] = cgpu;
|
devices[cgpu->cgminer_id = cgminer_id_count++] = cgpu;
|
||||||
mining_threads += cgpu->threads;
|
mining_threads += cgpu->threads;
|
||||||
|
#ifdef HAVE_CURSES
|
||||||
adj_width(mining_threads, &dev_width);
|
adj_width(mining_threads, &dev_width);
|
||||||
|
#endif
|
||||||
#ifdef HAVE_OPENCL
|
#ifdef HAVE_OPENCL
|
||||||
if (cgpu->api == &opencl_api) {
|
if (cgpu->api == &opencl_api) {
|
||||||
gpu_threads += cgpu->threads;
|
gpu_threads += cgpu->threads;
|
||||||
|
@ -145,6 +145,10 @@ static void biforce_clear_buffer(struct cgpu_info *bitforce)
|
|||||||
{
|
{
|
||||||
int fdDev = bitforce->device_fd;
|
int fdDev = bitforce->device_fd;
|
||||||
char pdevbuf[0x100];
|
char pdevbuf[0x100];
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
if (!fdDev)
|
||||||
|
return;
|
||||||
|
|
||||||
applog(LOG_DEBUG, "BFL%i: Clearing read buffer", bitforce->device_id);
|
applog(LOG_DEBUG, "BFL%i: Clearing read buffer", bitforce->device_id);
|
||||||
|
|
||||||
@ -152,7 +156,7 @@ static void biforce_clear_buffer(struct cgpu_info *bitforce)
|
|||||||
do {
|
do {
|
||||||
pdevbuf[0] = '\0';
|
pdevbuf[0] = '\0';
|
||||||
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
|
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
|
||||||
} while (pdevbuf[0]);
|
} while (pdevbuf[0] && (++count < 10));
|
||||||
mutex_unlock(&bitforce->device_mutex);
|
mutex_unlock(&bitforce->device_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user