AcquisitionDevice: Minor adjustments to handling work requests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user