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_poll.c b/src/ev_poll.c
index 537157f..8b3f595 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -70,8 +70,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) {
@@ -87,7 +87,7 @@
hap_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