|
|
@ -3036,6 +3036,8 @@ static void *get_work_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_detach(pthread_self()); |
|
|
|
pthread_detach(pthread_self()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("get_work"); |
|
|
|
|
|
|
|
|
|
|
|
applog(LOG_DEBUG, "Creating extra get work thread"); |
|
|
|
applog(LOG_DEBUG, "Creating extra get work thread"); |
|
|
|
|
|
|
|
|
|
|
|
retry: |
|
|
|
retry: |
|
|
@ -3219,6 +3221,8 @@ static void *submit_work_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_detach(pthread_self()); |
|
|
|
pthread_detach(pthread_self()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("submit_work"); |
|
|
|
|
|
|
|
|
|
|
|
applog(LOG_DEBUG, "Creating extra submit work thread"); |
|
|
|
applog(LOG_DEBUG, "Creating extra submit work thread"); |
|
|
|
|
|
|
|
|
|
|
|
check_solve(work); |
|
|
|
check_solve(work); |
|
|
@ -3662,6 +3666,8 @@ static void *stage_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("stage"); |
|
|
|
|
|
|
|
|
|
|
|
while (ok) { |
|
|
|
while (ok) { |
|
|
|
struct work *work = NULL; |
|
|
|
struct work *work = NULL; |
|
|
|
|
|
|
|
|
|
|
@ -4341,6 +4347,8 @@ static void *input_thread(void __maybe_unused *userdata) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("input"); |
|
|
|
|
|
|
|
|
|
|
|
if (!curses_active) |
|
|
|
if (!curses_active) |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
|
@ -4377,6 +4385,8 @@ static void *workio_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("work_io"); |
|
|
|
|
|
|
|
|
|
|
|
while (ok) { |
|
|
|
while (ok) { |
|
|
|
struct workio_cmd *wc; |
|
|
|
struct workio_cmd *wc; |
|
|
|
|
|
|
|
|
|
|
@ -4416,6 +4426,8 @@ static void *api_thread(void *userdata) |
|
|
|
pthread_detach(pthread_self()); |
|
|
|
pthread_detach(pthread_self()); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("api"); |
|
|
|
|
|
|
|
|
|
|
|
api(api_thr_id); |
|
|
|
api(api_thr_id); |
|
|
|
|
|
|
|
|
|
|
|
PTH(mythr) = 0L; |
|
|
|
PTH(mythr) = 0L; |
|
|
@ -4662,6 +4674,8 @@ static void *stratum_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_detach(pthread_self()); |
|
|
|
pthread_detach(pthread_self()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("stratum"); |
|
|
|
|
|
|
|
|
|
|
|
while (42) { |
|
|
|
while (42) { |
|
|
|
struct timeval timeout; |
|
|
|
struct timeval timeout; |
|
|
|
fd_set rd; |
|
|
|
fd_set rd; |
|
|
@ -5495,6 +5509,8 @@ void *miner_thread(void *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("miner"); |
|
|
|
|
|
|
|
|
|
|
|
gettimeofday(&getwork_start, NULL); |
|
|
|
gettimeofday(&getwork_start, NULL); |
|
|
|
|
|
|
|
|
|
|
|
if (api->thread_init && !api->thread_init(mythr)) { |
|
|
|
if (api->thread_init && !api->thread_init(mythr)) { |
|
|
@ -5750,6 +5766,8 @@ static void *longpoll_thread(void *userdata) |
|
|
|
char *lp_url; |
|
|
|
char *lp_url; |
|
|
|
int rolltime; |
|
|
|
int rolltime; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("longpoll"); |
|
|
|
|
|
|
|
|
|
|
|
curl = curl_easy_init(); |
|
|
|
curl = curl_easy_init(); |
|
|
|
if (unlikely(!curl)) { |
|
|
|
if (unlikely(!curl)) { |
|
|
|
applog(LOG_ERR, "CURL initialisation failed"); |
|
|
|
applog(LOG_ERR, "CURL initialisation failed"); |
|
|
@ -5941,6 +5959,8 @@ static void *watchpool_thread(void __maybe_unused *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("watchpool"); |
|
|
|
|
|
|
|
|
|
|
|
while (42) { |
|
|
|
while (42) { |
|
|
|
struct timeval now; |
|
|
|
struct timeval now; |
|
|
|
int i; |
|
|
|
int i; |
|
|
@ -6012,6 +6032,8 @@ static void *watchdog_thread(void __maybe_unused *userdata) |
|
|
|
|
|
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RenameThread("watchdog"); |
|
|
|
|
|
|
|
|
|
|
|
memset(&zero_tv, 0, sizeof(struct timeval)); |
|
|
|
memset(&zero_tv, 0, sizeof(struct timeval)); |
|
|
|
gettimeofday(&rotate_tv, NULL); |
|
|
|
gettimeofday(&rotate_tv, NULL); |
|
|
|
|
|
|
|
|
|
|
|