Commit 473e58c0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Collapse two VTAILQ_ENTRY() in struct sess, saving 16 bytes.

parent 0b1e63e3
......@@ -636,6 +636,8 @@ struct sess {
struct worker *wrk;
struct req *req;
VTAILQ_ENTRY(sess) list;
/* Session related fields ------------------------------------*/
int fd;
......@@ -651,11 +653,8 @@ struct sess {
char addr[ADDR_BUFSIZE];
char port[PORT_BUFSIZE];
VTAILQ_ENTRY(sess) poollist;
struct acct acct_ses;
VTAILQ_ENTRY(sess) list;
/* Timestamps, all on TIM_real() timescale */
double t_open; /* fd accepted */
double t_idle; /* fd accepted or resp sent */
......
......@@ -201,7 +201,7 @@ Pool_Work_Thread(void *priv, struct worker *wrk)
if (wrk->sp != NULL) {
/* Process queued requests, if any */
assert(pp->lqueue > 0);
VTAILQ_REMOVE(&pp->queue, wrk->sp, poollist);
VTAILQ_REMOVE(&pp->queue, wrk->sp, list);
wrk->do_what = pool_do_sess;
pp->lqueue--;
} else if (!VTAILQ_EMPTY(&pp->socks)) {
......@@ -314,7 +314,7 @@ pool_queue(struct pool *pp, struct sess *sp)
return (-1);
}
VTAILQ_INSERT_TAIL(&pp->queue, sp, poollist);
VTAILQ_INSERT_TAIL(&pp->queue, sp, list);
pp->nqueued++;
pp->lqueue++;
Lck_Unlock(&pp->mtx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment