This commit is contained in:
Nav
2022-04-16 21:23:03 +01:00
parent fe665cb763
commit 8d26340c41
4 changed files with 12 additions and 10 deletions

View File

@@ -184,19 +184,17 @@ namespace Bloom::DebugServer::Gdb
std::array<unsigned char, bufferSize> buffer = {};
ssize_t bytesRead = 0;
if (interruptible) {
if (this->readInterruptEnabled != interruptible) {
if (this->readInterruptEnabled != interruptible) {
if (interruptible) {
this->enableReadInterrupts();
} else {
// Clear any previous interrupts that are still hanging around
this->interruptEventNotifier.clear();
this->disableReadInterrupts();
}
}
if (this->readInterruptEnabled != interruptible && !interruptible) {
this->disableReadInterrupts();
}
// Clear any previous interrupts that are still hanging around
this->interruptEventNotifier.clear();
const auto eventFileDescriptor = this->epollInstance.waitForEvent(timeout);