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/include/types/fd.h b/include/types/fd.h
index 701edfc..23550cb 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -46,7 +46,7 @@
#define FD_POLL_STICKY (FD_POLL_ERR | FD_POLL_HUP)
/* Event state for an FD in each direction, as found in the 4 lower bits of
- * fdtab[].spec_e, and in the 4 next bits.
+ * fdtab[].state, and in the 4 next bits.
*/
#define FD_EV_ACTIVE 1U
#define FD_EV_POLLED 4U
@@ -70,7 +70,7 @@
int (*iocb)(int fd); /* I/O handler, returns FD_WAIT_* */
void *owner; /* the connection or listener associated with this fd, NULL if closed */
unsigned int spec_p; /* speculative polling: position in spec list+1. 0=not in list. */
- unsigned char spec_e; /* speculative polling: read and write events status. 4 bits */
+ unsigned char state; /* FD state for read and write directions */
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
unsigned char new:1; /* 1 if this fd has just been created */
unsigned char updated:1; /* 1 if this fd is already in the update list */