static void hfa_shutdown(struct thr_info *thr) { struct cgpu_info *hashfast = thr->cgpu; struct hashfast_info *info = hashfast->device_data; hfa_send_shutdown(hashfast); pthread_join(info->read_thr, NULL); hfa_free_all_work(info); hfa_clear_readbuf(hashfast); free(info->works); free(info->die_statistics); free(info->die_status); free(info); }
static void hfa_shutdown(struct thr_info *thr) { struct cgpu_info *hashfast = thr->cgpu; struct hashfast_info *info = hashfast->device_data; hfa_send_shutdown(hashfast); pthread_join(info->read_thr, NULL); hfa_free_all_work(info); hfa_clear_readbuf(hashfast); free(info->works); free(info->die_statistics); free(info->die_status); /* Don't free info here since it will be accessed by statline before * if a device is removed. */ }