Remove request_exit() function.

This just set the do_exit flag, and was now only called in one place.
This commit is contained in:
Martin Ling
2022-03-18 01:53:00 +00:00
parent c4789df44c
commit 503cd3316c

View File

@ -181,11 +181,6 @@ static int create_transfer_thread(hackrf_device* device);
static libusb_context* g_libusb_context = NULL;
int last_libusb_error = LIBUSB_SUCCESS;
static void request_exit(hackrf_device* device)
{
device->do_exit = true;
}
/*
* Check if the transfers are setup and owned by libusb.
*
@ -1781,10 +1776,10 @@ static int kill_transfer_thread(hackrf_device* device)
* thread has handled all completion callbacks.
*/
cancel_transfers(device);
/*
* Now call request_exit() to halt the main loop.
*/
request_exit(device);
// Set flag to tell the thread to exit.
device->do_exit = true;
/*
* Interrupt the event handling thread instead of
* waiting for timeout.