Browse Source

make sure reinit_device cannot happen while algo switching, which would probably result in segfault

djm34
Jan Berdajs 10 years ago
parent
commit
f0e47ec8ec
  1. 2
      sgminer.c

2
sgminer.c

@ -7272,7 +7272,9 @@ static void *longpoll_thread(void __maybe_unused *userdata) @@ -7272,7 +7272,9 @@ static void *longpoll_thread(void __maybe_unused *userdata)
void reinit_device(struct cgpu_info *cgpu)
{
mutex_lock(&algo_switch_lock);
cgpu->drv->reinit_device(cgpu);
mutex_unlock(&algo_switch_lock);
}
static struct timeval rotate_tv;

Loading…
Cancel
Save