[master] b78a4672d Privatize stuff.

Poul-Henning Kamp phk at FreeBSD.org
Wed Aug 29 05:15:13 UTC 2018


commit b78a4672d6b27c1d662f43dca307061b84229799
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 154a6796b..cb1d295a5 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 *);
@@ -409,8 +409,6 @@ void VCL_VRT_Init(void);
 int VCL_StackVFP(struct vfp_ctx *, const struct vcl *, const char *);
 
 /* 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