| 509 | } |
| 510 | |
| 511 | void UsbInterface::stopControlThread(void) |
| 512 | { |
| 513 | if (!mCtrlThreadValid) { |
| 514 | return; |
| 515 | } |
| 516 | |
| 517 | mCtrlRunning.store(false); |
| 518 | threadWaitForExit(&mCtrlThread); |
| 519 | threadClose(&mCtrlThread); |
| 520 | mCtrlThreadValid = false; |
| 521 | } |
| 522 | |
| 523 | void UsbInterface::controlThreadEntry(void* self) |
| 524 | { |