mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Fix deadlock with Driver::write
Use a spin lock to recheck the queue size until it has room to push.
This commit is contained in:
@@ -199,6 +199,5 @@ void FTDI::writeTask() {
|
||||
continue;
|
||||
|
||||
ftdi.write(writeOp.bytes.data(), (int)writeOp.bytes.size());
|
||||
onWrite();
|
||||
}
|
||||
}
|
||||
@@ -134,6 +134,5 @@ void STM32::writeTask() {
|
||||
ssize_t actualWritten = ::write(fd, writeOp.bytes.data(), writeSize);
|
||||
if(actualWritten != writeSize)
|
||||
report(APIEvent::Type::FailedToWrite, APIEvent::Severity::Error);
|
||||
onWrite();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user