|
|
@@ -1624,6 +1624,16 @@ int main (int argc, char *argv[])
|
|
|
char name[32];
|
|
|
struct cgpu_info *gpus = NULL, *cpus = NULL;
|
|
|
|
|
|
+ if (unlikely(pthread_mutex_init(&time_lock, NULL)))
|
|
|
+ return 1;
|
|
|
+ if (unlikely(pthread_mutex_init(&hash_lock, NULL)))
|
|
|
+ return 1;
|
|
|
+ if (unlikely(pthread_mutex_init(&qd_lock, NULL)))
|
|
|
+ return 1;
|
|
|
+ if (unlikely(pthread_mutex_init(&stgd_lock, NULL)))
|
|
|
+ return 1;
|
|
|
+
|
|
|
+
|
|
|
#ifdef WIN32
|
|
|
opt_n_threads = num_processors = 1;
|
|
|
#else
|
|
|
@@ -1671,15 +1681,6 @@ int main (int argc, char *argv[])
|
|
|
sprintf(rpc_userpass, "%s:%s", rpc_user, rpc_pass);
|
|
|
}
|
|
|
|
|
|
- if (unlikely(pthread_mutex_init(&time_lock, NULL)))
|
|
|
- return 1;
|
|
|
- if (unlikely(pthread_mutex_init(&hash_lock, NULL)))
|
|
|
- return 1;
|
|
|
- if (unlikely(pthread_mutex_init(&qd_lock, NULL)))
|
|
|
- return 1;
|
|
|
- if (unlikely(pthread_mutex_init(&stgd_lock, NULL)))
|
|
|
- return 1;
|
|
|
-
|
|
|
if (unlikely(curl_global_init(CURL_GLOBAL_ALL)))
|
|
|
return 1;
|
|
|
#ifdef HAVE_SYSLOG_H
|