mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
changes to queueing strategy for BitBurner boards
This commit is contained in:
parent
1bb6dd406a
commit
2b932ccb81
@ -1016,6 +1016,15 @@ static void *avalon_send_tasks(void *userdata)
|
|||||||
mutex_unlock(&info->lock);
|
mutex_unlock(&info->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (usb_ident(avalon) == IDENT_BTB) {
|
||||||
|
// Give other threads the chance to acquire qlock
|
||||||
|
i = 0;
|
||||||
|
do {
|
||||||
|
nmsleep(40);
|
||||||
|
} while (!avalon->shutdown && i++ < 15
|
||||||
|
&& avalon->queued < avalon_get_work_count);
|
||||||
|
}
|
||||||
|
|
||||||
mutex_lock(&info->qlock);
|
mutex_lock(&info->qlock);
|
||||||
start_count = avalon->work_array * avalon_get_work_count;
|
start_count = avalon->work_array * avalon_get_work_count;
|
||||||
end_count = start_count + avalon_get_work_count;
|
end_count = start_count + avalon_get_work_count;
|
||||||
|
@ -146,7 +146,7 @@ struct avalon_info {
|
|||||||
|
|
||||||
#define AVALON_WRITE_SIZE (sizeof(struct avalon_task))
|
#define AVALON_WRITE_SIZE (sizeof(struct avalon_task))
|
||||||
#define AVALON_READ_SIZE (sizeof(struct avalon_result))
|
#define AVALON_READ_SIZE (sizeof(struct avalon_result))
|
||||||
#define AVALON_ARRAY_SIZE 3
|
#define AVALON_ARRAY_SIZE 4
|
||||||
|
|
||||||
#define AVA_GETS_ERROR -1
|
#define AVA_GETS_ERROR -1
|
||||||
#define AVA_GETS_OK 0
|
#define AVA_GETS_OK 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user