mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 22:14:36 +00:00
Merge branch 'master' of https://github.com/ckolivas/cgminer
This commit is contained in:
commit
794b6558a3
14
cgminer.c
14
cgminer.c
@ -69,9 +69,7 @@ enum workio_commands {
|
|||||||
struct workio_cmd {
|
struct workio_cmd {
|
||||||
enum workio_commands cmd;
|
enum workio_commands cmd;
|
||||||
struct thr_info *thr;
|
struct thr_info *thr;
|
||||||
union {
|
struct work *work;
|
||||||
struct work *work;
|
|
||||||
} u;
|
|
||||||
bool lagging;
|
bool lagging;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1906,7 +1904,7 @@ static void workio_cmd_free(struct workio_cmd *wc)
|
|||||||
|
|
||||||
switch (wc->cmd) {
|
switch (wc->cmd) {
|
||||||
case WC_SUBMIT_WORK:
|
case WC_SUBMIT_WORK:
|
||||||
free_work(wc->u.work);
|
free_work(wc->work);
|
||||||
break;
|
break;
|
||||||
default: /* do nothing */
|
default: /* do nothing */
|
||||||
break;
|
break;
|
||||||
@ -2220,7 +2218,7 @@ static void check_solve(struct work *work)
|
|||||||
static void *submit_work_thread(void *userdata)
|
static void *submit_work_thread(void *userdata)
|
||||||
{
|
{
|
||||||
struct workio_cmd *wc = (struct workio_cmd *)userdata;
|
struct workio_cmd *wc = (struct workio_cmd *)userdata;
|
||||||
struct work *work = wc->u.work;
|
struct work *work = wc->work;
|
||||||
struct pool *pool = work->pool;
|
struct pool *pool = work->pool;
|
||||||
struct curl_ent *ce;
|
struct curl_ent *ce;
|
||||||
int failures = 0;
|
int failures = 0;
|
||||||
@ -3852,11 +3850,11 @@ bool submit_work_sync(struct thr_info *thr, const struct work *work_in)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wc->u.work = make_work();
|
wc->work = make_work();
|
||||||
wc->cmd = WC_SUBMIT_WORK;
|
wc->cmd = WC_SUBMIT_WORK;
|
||||||
wc->thr = thr;
|
wc->thr = thr;
|
||||||
memcpy(wc->u.work, work_in, sizeof(*work_in));
|
memcpy(wc->work, work_in, sizeof(*work_in));
|
||||||
wc->u.work->share_found_time = time(NULL);
|
wc->work->share_found_time = time(NULL);
|
||||||
|
|
||||||
applog(LOG_DEBUG, "Pushing submit work to work thread");
|
applog(LOG_DEBUG, "Pushing submit work to work thread");
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ static void ztex_detect(void)
|
|||||||
struct cgpu_info *ztex;
|
struct cgpu_info *ztex;
|
||||||
|
|
||||||
cnt = libztex_scanDevices(&ztex_devices);
|
cnt = libztex_scanDevices(&ztex_devices);
|
||||||
applog(LOG_WARNING, "Found %d ztex board(s)", cnt);
|
if (cnt > 0)
|
||||||
|
applog(LOG_WARNING, "Found %d ztex board%s", cnt, cnt > 1 ? "s" : "");
|
||||||
|
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
ztex = calloc(1, sizeof(struct cgpu_info));
|
ztex = calloc(1, sizeof(struct cgpu_info));
|
||||||
|
@ -159,6 +159,7 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
|
|||||||
applog(LOG_ERR, "%s is already in use by another process", devpath);
|
applog(LOG_ERR, "%s is already in use by another process", devpath);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
applog(LOG_DEBUG, "Open %s failed, GetLastError:%u", devpath, e);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
@ -196,6 +197,9 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
|
|||||||
{
|
{
|
||||||
if (errno == EACCES)
|
if (errno == EACCES)
|
||||||
applog(LOG_ERR, "Do not have user privileges required to open %s", devpath);
|
applog(LOG_ERR, "Do not have user privileges required to open %s", devpath);
|
||||||
|
else
|
||||||
|
applog(LOG_DEBUG, "Open %s failed, errno:%d", devpath, errno);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user