Commit 573016ec authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Rename the "misc" lock class to "waiter"

Give the backend tcp-pools their own lock class instead of mixing
them up with the backend lock class.
parent 95aeadd2
...@@ -158,7 +158,7 @@ VBT_Ref(const struct suckaddr *ip4, const struct suckaddr *ip6) ...@@ -158,7 +158,7 @@ VBT_Ref(const struct suckaddr *ip4, const struct suckaddr *ip6)
if (ip6 != NULL) if (ip6 != NULL)
tp->ip6 = VSA_Clone(ip6); tp->ip6 = VSA_Clone(ip6);
tp->refcnt = 1; tp->refcnt = 1;
Lck_New(&tp->mtx, lck_backend); Lck_New(&tp->mtx, lck_backend_tcp);
VTAILQ_INIT(&tp->connlist); VTAILQ_INIT(&tp->connlist);
VTAILQ_INIT(&tp->killlist); VTAILQ_INIT(&tp->killlist);
VTAILQ_INSERT_HEAD(&pools, tp, list); VTAILQ_INSERT_HEAD(&pools, tp, list);
......
...@@ -180,7 +180,7 @@ vwe_init(struct waiter *w) ...@@ -180,7 +180,7 @@ vwe_init(struct waiter *w)
vwe->epfd = epoll_create(1); vwe->epfd = epoll_create(1);
assert(vwe->epfd >= 0); assert(vwe->epfd >= 0);
Lck_New(&vwe->mtx, lck_misc); Lck_New(&vwe->mtx, lck_waiter);
AZ(pipe(vwe->pipe)); AZ(pipe(vwe->pipe));
ee.events = EPOLLIN | EPOLLRDHUP; ee.events = EPOLLIN | EPOLLRDHUP;
ee.data.ptr = vwe; ee.data.ptr = vwe;
......
...@@ -172,7 +172,7 @@ vwk_init(struct waiter *w) ...@@ -172,7 +172,7 @@ vwk_init(struct waiter *w)
vwk->kq = kqueue(); vwk->kq = kqueue();
assert(vwk->kq >= 0); assert(vwk->kq >= 0);
Lck_New(&vwk->mtx, lck_misc); Lck_New(&vwk->mtx, lck_waiter);
AZ(pipe(vwk->pipe)); AZ(pipe(vwk->pipe));
EV_SET(&ke, vwk->pipe[0], EVFILT_READ, EV_ADD, 0, 0, vwk); EV_SET(&ke, vwk->pipe[0], EVFILT_READ, EV_ADD, 0, 0, vwk);
AZ(kevent(vwk->kq, &ke, 1, NULL, 0, NULL)); AZ(kevent(vwk->kq, &ke, 1, NULL, 0, NULL));
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
/*lint -save -e525 -e539 */ /*lint -save -e525 -e539 */
LOCK(backend) LOCK(backend)
LOCK(backend_tcp)
LOCK(ban) LOCK(ban)
LOCK(busyobj) LOCK(busyobj)
LOCK(cli) LOCK(cli)
...@@ -38,7 +39,6 @@ LOCK(hcl) ...@@ -38,7 +39,6 @@ LOCK(hcl)
LOCK(hsl) LOCK(hsl)
LOCK(lru) LOCK(lru)
LOCK(mempool) LOCK(mempool)
LOCK(misc)
LOCK(objhdr) LOCK(objhdr)
LOCK(pipestat) LOCK(pipestat)
LOCK(sess) LOCK(sess)
...@@ -49,6 +49,7 @@ LOCK(vbe) ...@@ -49,6 +49,7 @@ LOCK(vbe)
LOCK(vcapace) LOCK(vcapace)
LOCK(vcl) LOCK(vcl)
LOCK(vxid) LOCK(vxid)
LOCK(waiter)
LOCK(wq) LOCK(wq)
LOCK(wstat) LOCK(wstat)
/*lint -restore */ /*lint -restore */
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