|
|
|
@ -343,13 +343,17 @@ static void biforce_thread_enable(struct thr_info *thr)
@@ -343,13 +343,17 @@ static void biforce_thread_enable(struct thr_info *thr)
|
|
|
|
|
bitforce_init(bitforce); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
extern bool opt_submit_stale; |
|
|
|
|
|
|
|
|
|
static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint64_t __maybe_unused max_nonce) |
|
|
|
|
{ |
|
|
|
|
struct cgpu_info *bitforce = thr->cgpu; |
|
|
|
|
bool submit_old = work->pool->submit_old; |
|
|
|
|
bitforce->wait_ms = 0; |
|
|
|
|
uint64_t ret; |
|
|
|
|
|
|
|
|
|
if (ret = bitforce_send_work(thr, work)) { |
|
|
|
|
if(!opt_submit_stale || !submit_old) { |
|
|
|
|
while (bitforce->wait_ms < bitforce->sleep_ms) { |
|
|
|
|
usleep(WORK_CHECK_INTERVAL_MS*1000); |
|
|
|
|
bitforce->wait_ms += WORK_CHECK_INTERVAL_MS; |
|
|
|
@ -358,6 +362,10 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
@@ -358,6 +362,10 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
|
|
|
|
|
return 1; //we have discarded all work; equivilent to 0 hashes done.
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
usleep(bitforce->sleep_ms*1000); |
|
|
|
|
bitforce->wait_ms = bitforce->sleep_ms; |
|
|
|
|
} |
|
|
|
|
ret = bitforce_get_result(thr, work); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|