|
|
@@ -2283,6 +2283,7 @@ static void *get_work_thread(void *userdata)
|
|
|
int failures = 0;
|
|
|
|
|
|
pthread_detach(pthread_self());
|
|
|
+ rename_thr("bfg-get_work");
|
|
|
|
|
|
applog(LOG_DEBUG, "Creating extra get work thread");
|
|
|
|
|
|
@@ -2422,6 +2423,7 @@ static void *submit_work_thread(void *userdata)
|
|
|
int failures = 0;
|
|
|
|
|
|
pthread_detach(pthread_self());
|
|
|
+ rename_thr("bfg-submit_work");
|
|
|
|
|
|
applog(LOG_DEBUG, "Creating extra submit work thread");
|
|
|
|
|
|
@@ -2786,6 +2788,7 @@ static void *stage_thread(void *userdata)
|
|
|
struct thr_info *mythr = userdata;
|
|
|
bool ok = true;
|
|
|
|
|
|
+ rename_thr("bfg-stage");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
while (ok) {
|
|
|
@@ -3404,6 +3407,7 @@ retry:
|
|
|
|
|
|
static void *input_thread(void __maybe_unused *userdata)
|
|
|
{
|
|
|
+ rename_thr("bfg-input");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
if (!curses_active)
|
|
|
@@ -3440,6 +3444,7 @@ static void *workio_thread(void *userdata)
|
|
|
struct thr_info *mythr = userdata;
|
|
|
bool ok = true;
|
|
|
|
|
|
+ rename_thr("bfg-workio");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
while (ok) {
|
|
|
@@ -3479,6 +3484,7 @@ static void *api_thread(void *userdata)
|
|
|
struct thr_info *mythr = userdata;
|
|
|
|
|
|
pthread_detach(pthread_self());
|
|
|
+ rename_thr("bfg-rpc");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
api(api_thr_id);
|
|
|
@@ -4126,6 +4132,12 @@ void *miner_thread(void *userdata)
|
|
|
struct cgminer_stats *pool_stats;
|
|
|
struct timeval getwork_start;
|
|
|
|
|
|
+ {
|
|
|
+ char thrname[16];
|
|
|
+ sprintf(thrname, "bfg-miner-%s%d", api->name, cgpu->device_id);
|
|
|
+ rename_thr(thrname);
|
|
|
+ }
|
|
|
+
|
|
|
/* Try to cycle approximately 5 times before each log update */
|
|
|
const long cycle = opt_log_interval / 5 ? : 1;
|
|
|
struct timeval tv_start, tv_end, tv_workstart, tv_lastupdate;
|
|
|
@@ -4411,6 +4423,8 @@ static void *longpoll_thread(void *userdata)
|
|
|
int failures = 0;
|
|
|
int rolltime;
|
|
|
|
|
|
+ rename_thr("bfg-longpoll");
|
|
|
+
|
|
|
curl = curl_easy_init();
|
|
|
if (unlikely(!curl)) {
|
|
|
applog(LOG_ERR, "CURL initialisation failed");
|
|
|
@@ -4531,6 +4545,7 @@ static void reap_curl(struct pool *pool)
|
|
|
|
|
|
static void *watchpool_thread(void __maybe_unused *userdata)
|
|
|
{
|
|
|
+ rename_thr("bfg-watchpool");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
while (42) {
|
|
|
@@ -4597,6 +4612,7 @@ static void *watchdog_thread(void __maybe_unused *userdata)
|
|
|
const unsigned int interval = WATCHDOG_INTERVAL;
|
|
|
struct timeval zero_tv;
|
|
|
|
|
|
+ rename_thr("bfg-watchdog");
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
memset(&zero_tv, 0, sizeof(struct timeval));
|