mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-03 10:35:03 +00:00
Avoid attempting to recursively lock the console mutex by disabling warnings in gpu_fanpercent when fanspeed monitoring fails on windows. Debugged by luke-jr.
This commit is contained in:
parent
8fc701dd76
commit
272ba4ed89
10
adl.c
10
adl.c
@ -703,6 +703,8 @@ int gpu_fanpercent(int gpu)
|
|||||||
ret = __gpu_fanpercent(ga);
|
ret = __gpu_fanpercent(ga);
|
||||||
unlock_adl();
|
unlock_adl();
|
||||||
if (unlikely(ga->has_fanspeed && ret == -1)) {
|
if (unlikely(ga->has_fanspeed && ret == -1)) {
|
||||||
|
#if 0
|
||||||
|
/* Recursive calling applog causes a hang, so disable messages */
|
||||||
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
|
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
|
||||||
if (opt_restart) {
|
if (opt_restart) {
|
||||||
applog(LOG_WARNING, "Restart enabled, will attempt to restart cgminer");
|
applog(LOG_WARNING, "Restart enabled, will attempt to restart cgminer");
|
||||||
@ -716,6 +718,14 @@ int gpu_fanpercent(int gpu)
|
|||||||
ga->twin->twin = NULL;;
|
ga->twin->twin = NULL;;
|
||||||
ga->twin = NULL;
|
ga->twin = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
if (opt_restart)
|
||||||
|
app_restart();
|
||||||
|
ga->has_fanspeed = false;
|
||||||
|
if (ga->twin) {
|
||||||
|
ga->twin->twin = NULL;;
|
||||||
|
ga->twin = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user