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