[master] 573016e Rename the "misc" lock class to "waiter"

Poul-Henning Kamp phk at FreeBSD.org
Tue Jul 7 11:41:13 CEST 2015


commit 573016ec21be8b0eff97ab3032bfef4a45d02631
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jul 7 09:31:19 2015 +0000

    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.

diff --git a/bin/varnishd/cache/cache_backend_tcp.c b/bin/varnishd/cache/cache_backend_tcp.c
index 3e99387..13a026c 100644
--- a/bin/varnishd/cache/cache_backend_tcp.c
+++ b/bin/varnishd/cache/cache_backend_tcp.c
@@ -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);
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index e60d55a..cb6dbdc 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -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;
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 1b7e6a0..02d7adc 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -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));
diff --git a/include/tbl/locks.h b/include/tbl/locks.h
index 7331493..8fe77fe 100644
--- a/include/tbl/locks.h
+++ b/include/tbl/locks.h
@@ -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 */



More information about the varnish-commit mailing list