Commit 69e6872b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a per session mutex, there are now things we do in parallel

which will need this.

We may need to improve MPL or LCK to cope with this.
parent 5f122e83
......@@ -709,6 +709,7 @@ struct sess {
#define SESS_MAGIC 0x2c2f9c5a
enum sess_step sess_step;
struct lock mtx;
int fd;
enum sess_close reason;
uint32_t vxid;
......
......@@ -102,6 +102,7 @@ ses_setup(struct sess *sp)
sp->sockaddr.ss_family = sp->mysockaddr.ss_family = PF_UNSPEC;
sp->t_open = NAN;
sp->t_idle = NAN;
Lck_New(&sp->mtx, lck_sess);
}
/*--------------------------------------------------------------------
......@@ -332,6 +333,7 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes);
VSL(SLT_End, sp->vxid, "%s", "");
Lck_Delete(&sp->mtx);
MPL_Free(pp->mpl_sess, sp);
}
......
......@@ -37,6 +37,7 @@ LOCK(hcb)
LOCK(hcl)
LOCK(vcl)
LOCK(sessmem)
LOCK(sess)
LOCK(wstat)
LOCK(herder)
LOCK(wq)
......
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