Removed pointless enum and tidied comments

This commit is contained in:
Nav
2022-09-26 21:21:57 +01:00
parent ba3152badb
commit ef4eb4f768
4 changed files with 6 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ namespace Bloom::DebugServer::Gdb
this->epollInstance.addEntry( this->epollInstance.addEntry(
this->socketFileDescriptor.value(), this->socketFileDescriptor.value(),
static_cast<std::uint16_t>(EpollEvent::READ_READY) static_cast<std::uint16_t>(::EPOLL_EVENTS::EPOLLIN)
); );
this->enableReadInterrupts(); this->enableReadInterrupts();
} }
@@ -264,7 +264,7 @@ namespace Bloom::DebugServer::Gdb
void Connection::enableReadInterrupts() { void Connection::enableReadInterrupts() {
this->epollInstance.addEntry( this->epollInstance.addEntry(
this->interruptEventNotifier.getFileDescriptor(), this->interruptEventNotifier.getFileDescriptor(),
static_cast<std::uint16_t>(EpollEvent::READ_READY) static_cast<std::uint16_t>(::EPOLL_EVENTS::EPOLLIN)
); );
this->readInterruptEnabled = true; this->readInterruptEnabled = true;

View File

@@ -106,12 +106,12 @@ namespace Bloom::DebugServer::Gdb
this->epollInstance.addEntry( this->epollInstance.addEntry(
this->serverSocketFileDescriptor.value(), this->serverSocketFileDescriptor.value(),
static_cast<std::uint16_t>(EpollEvent::READ_READY) static_cast<std::uint16_t>(::EPOLL_EVENTS::EPOLLIN)
); );
this->epollInstance.addEntry( this->epollInstance.addEntry(
this->interruptEventNotifier.getFileDescriptor(), this->interruptEventNotifier.getFileDescriptor(),
static_cast<std::uint16_t>(EpollEvent::READ_READY) static_cast<std::uint16_t>(::EPOLL_EVENTS::EPOLLIN)
); );
Logger::info("GDB RSP address: " + this->debugServerConfig.listeningAddress); Logger::info("GDB RSP address: " + this->debugServerConfig.listeningAddress);

View File

@@ -7,14 +7,8 @@
namespace Bloom namespace Bloom
{ {
enum class EpollEvent: std::uint16_t
{
READ_READY = EPOLL_EVENTS::EPOLLIN,
WRITE_READY = EPOLL_EVENTS::EPOLLOUT,
};
/** /**
* The EpollInstance class is an RAII wrapper for a single Linux epoll instance. * RAII wrapper for an epoll instance.
* *
* See https://man7.org/linux/man-pages/man7/epoll.7.html for more on the Linux epoll API. * See https://man7.org/linux/man-pages/man7/epoll.7.html for more on the Linux epoll API.
*/ */

View File

@@ -7,9 +7,7 @@
namespace Bloom namespace Bloom
{ {
/** /**
* The EventFdNotifier class is an RAII wrapper for a Linux eventfd object. * RAII wrapper for a Linux eventfd object, used to implement the NotifierInterface.
*
* It uses an eventfd object to implement the NotifierInterface.
*/ */
class EventFdNotifier: public NotifierInterface class EventFdNotifier: public NotifierInterface
{ {