correct select poll logic

This commit is contained in:
RaSCSI User 2022-10-22 20:44:47 +01:00
parent 5152b3bfd9
commit 8d70bb08ab
2 changed files with 3 additions and 6 deletions

View File

@ -754,13 +754,15 @@ bool GPIOBUS::PollSelectEvent()
LOGTRACE("%s starting epoll_wait", __PRETTY_FUNCTION__)
if (epoll_event epev; epoll_wait(epfd, &epev, 1, -1) <= 0) {
LOGWARN("%s epoll_wait failed", __PRETTY_FUNCTION__)
LOGERROR("[%08X] %s", errno, strerror(errno))
return false;
}
LOGTRACE("%s epoll_wait completed", __PRETTY_FUNCTION__)
if (gpioevent_data gpev; read(selevreq.fd, &gpev, sizeof(gpev)) < 0) {
LOGWARN("%s read failed", __PRETTY_FUNCTION__)
return false;
LOGERROR("[%08X] %s", errno, strerror(errno))
return false;
}
LOGTRACE("%s read completed", __PRETTY_FUNCTION__)

View File

@ -113,11 +113,6 @@ protected:
uint32_t signals = 0; // All bus signals
#ifdef USE_SEL_EVENT_ENABLE
struct gpioevent_request selevreq = {}; // SEL signal event request
int epfd; // epoll file descriptor
#endif // USE_SEL_EVENT_ENABLE
#if SIGNAL_CONTROL_MODE == 0
array<array<uint32_t, 256>, 3> tblDatMsk; // Data mask table