[PATCH] PRIV pointers available in vmod obj methods

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Nov 4 11:58:27 CET 2015


--------

Ok, wrapping this subject up:

Right now PRIV_foo is named with a mix of lifetime and visibility,
and we seem to need to be able to control both aspects.

The easiest and most backward compatible, seems to be to make
the naming

	PRIV_lifetime[_visibility]

With a default visibility of "VMOD" with other possible values being
"CALL" and "OBJ"

Three of the the current four PRIV's maps naturally:

	PRIV_VCL	-> PRIV_VCL_VMOD
	PRIV_TOP	-> PRIV_TOP_VMOD
	PRIV_TASK	-> PRIV_TASK_VMOD

But:

	PRIV_CALL	-> PRIV_VCL_CALL

The functionality Geoff requires would be PRIV_TASK_OBJ

If we special-case PRIV_CALL, this is backwards compatible.

Comments ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list