mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Provide a noop thread_shutdown function for drivers that don't support it.
This commit is contained in:
parent
2c28eefc45
commit
b884d11a23
@ -5522,8 +5522,7 @@ void *miner_thread(void *userdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (drv->thread_shutdown)
|
drv->thread_shutdown(mythr);
|
||||||
drv->thread_shutdown(mythr);
|
|
||||||
|
|
||||||
thread_reportin(mythr);
|
thread_reportin(mythr);
|
||||||
applog(LOG_ERR, "Thread %d failure, exiting", thr_id);
|
applog(LOG_ERR, "Thread %d failure, exiting", thr_id);
|
||||||
@ -6407,6 +6406,10 @@ static void noop_hw_error(struct thr_info __maybe_unused *thr)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void noop_thread_shutdown(struct thr_info __maybe_unused *thr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/* Fill missing driver api functions with noops */
|
/* Fill missing driver api functions with noops */
|
||||||
void fill_device_api(struct cgpu_info *cgpu)
|
void fill_device_api(struct cgpu_info *cgpu)
|
||||||
{
|
{
|
||||||
@ -6430,6 +6433,8 @@ void fill_device_api(struct cgpu_info *cgpu)
|
|||||||
drv->prepare_work = &noop_prepare_work;
|
drv->prepare_work = &noop_prepare_work;
|
||||||
if (!drv->hw_error)
|
if (!drv->hw_error)
|
||||||
drv->hw_error = &noop_hw_error;
|
drv->hw_error = &noop_hw_error;
|
||||||
|
if (!drv->thread_shutdown)
|
||||||
|
drv->thread_shutdown = &noop_thread_shutdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_device(struct cgpu_info *cgpu)
|
void enable_device(struct cgpu_info *cgpu)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user