Browse Source

Prepare sleep time on bflsc if no dev needs work yet to avoid busy waiting.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
09dbd616e2
  1. 2
      driver-bflsc.c

2
driver-bflsc.c

@ -1423,11 +1423,11 @@ static void *bflsc_get_results(void *userdata)
if (bflsc->usbinfo.nodev) if (bflsc->usbinfo.nodev)
return NULL; return NULL;
cgsleep_prepare_r(&ts_start);
if (dev == -1) if (dev == -1)
goto utsura; goto utsura;
cgtime(&(sc_info->sc_devs[dev].last_check_result)); cgtime(&(sc_info->sc_devs[dev].last_check_result));
cgsleep_prepare_r(&ts_start);
readok = bflsc_qres(bflsc, buf, sizeof(buf), dev, &err, &amount, false); readok = bflsc_qres(bflsc, buf, sizeof(buf), dev, &err, &amount, false);
if (err < 0 || (!readok && amount != BFLSC_QRES_LEN) || (readok && amount < 1)) { if (err < 0 || (!readok && amount != BFLSC_QRES_LEN) || (readok && amount < 1)) {

Loading…
Cancel
Save