REORG: polling: rename "spec_e" to "state" and "spec_p" to "cache"
We're completely changing the way FDs will be polled. There will be no
more speculative I/O since we'll know the exact FD state, so these will
only be cached events.
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. "spec_p" was used to store a speculative
I/O cache position. Now let's clearly call it "cache".
diff --git a/src/dumpstats.c b/src/dumpstats.c
index f861650..aabb556 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -4529,7 +4529,7 @@
conn->flags,
conn->t.sock.fd,
conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].state : 0,
- conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].spec_p : 0,
+ conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].cache : 0,
conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].updated : 0);
}
else if ((tmpctx = objt_appctx(sess->si[0].end)) != NULL) {
@@ -4557,7 +4557,7 @@
conn->flags,
conn->t.sock.fd,
conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].state : 0,
- conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].spec_p : 0,
+ conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].cache : 0,
conn->t.sock.fd >= 0 ? fdtab[conn->t.sock.fd].updated : 0);
}
else if ((tmpctx = objt_appctx(sess->si[1].end)) != NULL) {
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index ba0025b..e826af3 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -187,7 +187,7 @@
if (fdtab[fd].ev & FD_POLL_OUT)
fd_ev_set(fd, DIR_WR);
- if (fdtab[fd].spec_p) {
+ if (fdtab[fd].cache) {
/* This fd was already scheduled for being called as a speculative I/O */
continue;
}
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index ca14eeb..d59a570 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -158,7 +158,7 @@
if (fdtab[fd].ev & FD_POLL_OUT)
fd_ev_set(fd, DIR_WR);
- if (fdtab[fd].spec_p) {
+ if (fdtab[fd].cache) {
/* This fd was already scheduled for being
* called as a speculative I/O.
*/
diff --git a/src/ev_poll.c b/src/ev_poll.c
index 8b3f595..6a97c98 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -183,7 +183,7 @@
if (fdtab[fd].ev & FD_POLL_OUT)
fd_ev_set(fd, DIR_WR);
- if (fdtab[fd].spec_p) {
+ if (fdtab[fd].cache) {
/* This fd was already scheduled for being
* called as a speculative I/O
*/
diff --git a/src/ev_select.c b/src/ev_select.c
index 300cffa..14f1b1e 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -167,7 +167,7 @@
if (fdtab[fd].ev & FD_POLL_OUT)
fd_ev_set(fd, DIR_WR);
- if (fdtab[fd].spec_p) {
+ if (fdtab[fd].cache) {
/* This fd was already scheduled for being
* called as a speculative I/O.
*/