diff --git a/cpu-miner.c b/cpu-miner.c index d63ae16..6b66449 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -120,7 +120,7 @@ struct thr_info *thr_info; static int work_thr_id; int longpoll_thr_id; struct work_restart *work_restart = NULL; -pthread_mutex_t time_lock; +pthread_mutex_t applog_lock; pthread_mutex_t stats_lock; static unsigned long accepted_count = 0L; @@ -934,7 +934,7 @@ int main(int argc, char *argv[]) /* parse command line */ parse_cmdline(argc, argv); - pthread_mutex_init(&time_lock, NULL); + pthread_mutex_init(&applog_lock, NULL); pthread_mutex_init(&stats_lock, NULL); pthread_mutex_init(&g_work_lock, NULL); diff --git a/miner.h b/miner.h index 348da54..2d3c7d9 100644 --- a/miner.h +++ b/miner.h @@ -158,7 +158,7 @@ extern bool have_longpoll; extern char *opt_proxy; extern long opt_proxy_type; extern bool use_syslog; -extern pthread_mutex_t time_lock; +extern pthread_mutex_t applog_lock; extern struct thr_info *thr_info; extern int longpoll_thr_id; extern struct work_restart *work_restart; diff --git a/util.c b/util.c index 31991c5..208f435 100644 --- a/util.c +++ b/util.c @@ -91,10 +91,10 @@ void applog(int prio, const char *fmt, ...) time(&now); - pthread_mutex_lock(&time_lock); + pthread_mutex_lock(&applog_lock); tm_p = localtime(&now); memcpy(&tm, tm_p, sizeof(tm)); - pthread_mutex_unlock(&time_lock); + pthread_mutex_unlock(&applog_lock); len = 40 + strlen(fmt) + 2; f = alloca(len); @@ -106,9 +106,9 @@ void applog(int prio, const char *fmt, ...) tm.tm_min, tm.tm_sec, fmt); - pthread_mutex_lock(&time_lock); + pthread_mutex_lock(&applog_lock); vfprintf(stderr, f, ap); /* atomic write to stderr */ - pthread_mutex_unlock(&time_lock); + pthread_mutex_unlock(&applog_lock); } va_end(ap); }