AcquisitionDevice: Minor adjustments to handling work requests

This commit is contained in:
2023-04-25 11:24:44 +02:00
parent df15755612
commit f01f2e79d1
3 changed files with 3 additions and 7 deletions

View File

@@ -208,7 +208,7 @@ void AcquisitionDevice::WaitForActionComplete() {
void AcquisitionDevice::EndWorkRequestAndSignalQueues() {
HW_SetCancelDataCollectionBit();
work_request_queue.Put(0); // We use 0 for end of data collection - so if this is put into the queue, it will be
work_request_queue.Put(0); // 0 = end, this is to ensure that in a priority queue end marker is always first to take
send_work_request_future.get();
}

View File

@@ -114,9 +114,7 @@ void LinuxSocketDevice::HW_SetCancelDataCollectionBit() {
}
bool LinuxSocketDevice::HW_SendWorkRequest(uint32_t handle) {
if (handle == UINT32_MAX)
HW_SetCancelDataCollectionBit();
else
if (handle != UINT32_MAX)
wr_queue.Put(ProcessWorkRequest{
.ptr = buffer_device.at(handle),
.handle = handle

View File

@@ -112,9 +112,7 @@ void MlxRawEthDevice::HW_SetCancelDataCollectionBit() {
}
bool MlxRawEthDevice::HW_SendWorkRequest(uint32_t handle) {
if (handle == UINT32_MAX)
HW_SetCancelDataCollectionBit();
else
if (handle != UINT32_MAX)
wr_queue.Put(ProcessWorkRequest{
.ptr = buffer_device.at(handle),
.handle = handle