CLEANUP: polling: rename "spec_e" to "state"
We're completely changing the way FDs will be polled. First, let's fix
a few field names which become confusing. "spec_e" was used to store a
speculative I/O event state. Now we'll store the whole R/W states for
the FD there.
diff --git a/src/ev_select.c b/src/ev_select.c
index 946fbfd..300cffa 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -53,8 +53,8 @@
/* first, scan the update list to find changes */
for (updt_idx = 0; updt_idx < fd_nbupdt; updt_idx++) {
fd = fd_updt[updt_idx];
- en = fdtab[fd].spec_e & 15; /* new events */
- eo = fdtab[fd].spec_e >> 4; /* previous events */
+ en = fdtab[fd].state & 15; /* new events */
+ eo = fdtab[fd].state >> 4; /* previous events */
if (fdtab[fd].owner && (eo ^ en)) {
if ((eo ^ en) & FD_EV_POLLED_RW) {
@@ -70,7 +70,7 @@
FD_SET(fd, fd_evts[DIR_WR]);
}
- fdtab[fd].spec_e = (en << 4) + en; /* save new events */
+ fdtab[fd].state = (en << 4) + en; /* save new events */
if (!(en & FD_EV_ACTIVE_RW)) {
/* This fd doesn't use any active entry anymore, we can