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; static libusb_context* g_libusb_context = NULL;
int last_libusb_error = LIBUSB_SUCCESS; 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. * 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. * thread has handled all completion callbacks.
*/ */
cancel_transfers(device); cancel_transfers(device);
/*
* Now call request_exit() to halt the main loop. // Set flag to tell the thread to exit.
*/ device->do_exit = true;
request_exit(device);
/* /*
* Interrupt the event handling thread instead of * Interrupt the event handling thread instead of
* waiting for timeout. * waiting for timeout.