[6.0] 7bec6eab2 Privatize stuff.

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:10 UTC 2018


commit 7bec6eab2ac9516fcef856f1ea2beb42a5b3bd8f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 29 05:13:48 2018 +0000

    Privatize stuff.

diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index 2b7b254ad..9d5d78829 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -387,8 +387,8 @@ void VCL_Poll(void);
 void VCL_Ref(struct vcl *);
 void VCL_Refresh(struct vcl **);
 void VCL_Rel(struct vcl **);
-void VCL_TaskEnter(struct vcl *, struct vrt_privs *);
-void VCL_TaskLeave(struct vcl *, struct vrt_privs *);
+void VCL_TaskEnter(const struct vcl *, struct vrt_privs *);
+void VCL_TaskLeave(const struct vcl *, struct vrt_privs *);
 const char *VCL_Return_Name(unsigned);
 const char *VCL_Method_Name(unsigned);
 void VCL_Bo2Ctx(struct vrt_ctx *, struct busyobj *);
@@ -405,8 +405,6 @@ typedef int vcl_be_func(struct cli *, struct director *, void *);
 int VCL_IterDirector(struct cli *, const char *, vcl_be_func *, void *);
 
 /* cache_vrt.c */
-void VRTPRIV_init(struct vrt_privs *privs);
-void VRTPRIV_dynamic_kill(struct vrt_privs *privs, uintptr_t id);
 void pan_privs(struct vsb *, const struct vrt_privs *);
 
 /* cache_vrt_priv.c */
diff --git a/bin/varnishd/cache/cache_vrt_priv.c b/bin/varnishd/cache/cache_vrt_priv.c
index 3d8606b43..e4dd16479 100644
--- a/bin/varnishd/cache/cache_vrt_priv.c
+++ b/bin/varnishd/cache/cache_vrt_priv.c
@@ -83,7 +83,7 @@ pan_privs(struct vsb *vsb, const struct vrt_privs *privs)
 /*--------------------------------------------------------------------
  */
 
-void
+static void
 VRTPRIV_init(struct vrt_privs *privs)
 {
 
@@ -117,23 +117,6 @@ vrt_priv_dynamic(const struct vcl *vcl, struct ws *ws,
 	return (vp->priv);
 }
 
-void
-VRTPRIV_dynamic_kill(struct vrt_privs *privs, uintptr_t id)
-{
-	struct vrt_priv *vp, *vp1;
-
-	CHECK_OBJ_NOTNULL(privs, VRT_PRIVS_MAGIC);
-	AN(id);
-
-	VTAILQ_FOREACH_SAFE(vp, &privs->privs, list, vp1) {
-		CHECK_OBJ_NOTNULL(vp, VRT_PRIV_MAGIC);
-		if (id == vp->id) {
-			VTAILQ_REMOVE(&privs->privs, vp, list);
-			VRT_priv_fini(vp->priv);
-		}
-	}
-}
-
 struct vmod_priv *
 VRT_priv_task(VRT_CTX, const void *vmod_id)
 {
@@ -194,7 +177,7 @@ VRT_priv_fini(const struct vmod_priv *p)
 /*--------------------------------------------------------------------*/
 
 void
-VCL_TaskEnter(struct vcl *vcl, struct vrt_privs *privs)
+VCL_TaskEnter(const struct vcl *vcl, struct vrt_privs *privs)
 {
 
 	AN(vcl);
@@ -203,7 +186,7 @@ VCL_TaskEnter(struct vcl *vcl, struct vrt_privs *privs)
 }
 
 void
-VCL_TaskLeave(struct vcl *vcl, struct vrt_privs *privs)
+VCL_TaskLeave(const struct vcl *vcl, struct vrt_privs *privs)
 {
 	struct vrt_priv *vp, *vp1;
 


More information about the varnish-commit mailing list