Tidying
This commit is contained in:
@@ -25,6 +25,10 @@ Checks: >
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
|
||||
# Disabling this until https://github.com/llvm/llvm-project/issues/47384 is fixed.
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||
|
||||
CheckOptions:
|
||||
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
|
||||
value: 1
|
||||
|
||||
@@ -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 (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);
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Bloom::DebugServer::Gdb
|
||||
auto connection = this->waitForConnection();
|
||||
|
||||
if (!connection.has_value()) {
|
||||
// Likely an interrupt
|
||||
// Likely an interrupt - return control to DebugServerComponent::run() so it can process any events
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Bloom::DebugServer::Gdb
|
||||
|
||||
std::unique_ptr<CommandPacket> GdbRspDebugServer::resolveCommandPacket(const RawPacketType& rawPacket) {
|
||||
if (rawPacket.size() == 5 && rawPacket[1] == 0x03) {
|
||||
// This is an interrupt request - create a fake packet for it
|
||||
// Interrupt request
|
||||
return std::make_unique<CommandPackets::InterruptExecution>(rawPacket);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Key points:
|
||||
[eventfd object](https://man7.org/linux/man-pages/man2/eventfd.2.html). It implements the
|
||||
[`NotifierInterface`](../Helpers/NotifierInterface.hpp). An event can be recorded against the eventfd
|
||||
object via a call to `EventFdNotifier::notify()`.
|
||||
- The [`EventListener`](../EventManager/EventListener.hpp) class can accept an `NotifierInterface` object via
|
||||
- The [`EventListener`](../EventManager/EventListener.hpp) class can accept a `NotifierInterface` object via
|
||||
`EventListener::setInterruptEventNotifier()`. If a `NotifierInterface` has been set on an `EventListener`, the
|
||||
`EventListener` will call `NotifierInterface::notify()` everytime an event is registered for that listener.
|
||||
- The `EpollInstance` class is an RAII wrapper for a Linux
|
||||
|
||||
Reference in New Issue
Block a user