Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
917566c1
Commit
917566c1
authored
Jan 12, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass a (dummy) handler argument into waiter-instantiation
parent
eb65a574
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
9 deletions
+20
-9
cache_main.c
bin/varnishd/cache/cache_main.c
+1
-1
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+2
-2
cache_waiter_epoll.c
bin/varnishd/waiter/cache_waiter_epoll.c
+2
-1
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+2
-1
cache_waiter_poll.c
bin/varnishd/waiter/cache_waiter_poll.c
+2
-1
cache_waiter_ports.c
bin/varnishd/waiter/cache_waiter_ports.c
+2
-1
waiter.h
bin/varnishd/waiter/waiter.h
+9
-2
No files found.
bin/varnishd/cache/cache_main.c
View file @
917566c1
...
...
@@ -211,7 +211,7 @@ child_main(void)
Lck_New
(
&
vxid_lock
,
lck_vxid
);
WAIT_Init
();
WAIT_Init
(
NULL
);
PAN_Init
();
CLI_Init
();
VFP_Init
();
...
...
bin/varnishd/waiter/cache_waiter.c
View file @
917566c1
...
...
@@ -51,14 +51,14 @@ WAIT_GetName(void)
}
void
WAIT_Init
(
void
)
WAIT_Init
(
waiter_handle_f
*
func
)
{
AN
(
waiter
);
AN
(
waiter
->
name
);
AN
(
waiter
->
init
);
AN
(
waiter
->
pass
);
waiter_priv
=
waiter
->
init
();
waiter_priv
=
waiter
->
init
(
func
);
}
int
...
...
bin/varnishd/waiter/cache_waiter_epoll.c
View file @
917566c1
...
...
@@ -232,10 +232,11 @@ vwe_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwe_init
(
void
)
vwe_init
(
waiter_handle_f
*
func
)
{
struct
vwe
*
vwe
;
(
void
)
func
;
ALLOC_OBJ
(
vwe
,
VWE_MAGIC
);
AN
(
vwe
);
VTAILQ_INIT
(
&
vwe
->
sesshead
);
...
...
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
917566c1
...
...
@@ -228,10 +228,11 @@ vwk_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwk_init
(
void
)
vwk_init
(
waiter_handle_f
*
func
)
{
struct
vwk
*
vwk
;
(
void
)
func
;
ALLOC_OBJ
(
vwk
,
VWK_MAGIC
);
AN
(
vwk
);
...
...
bin/varnishd/waiter/cache_waiter_poll.c
View file @
917566c1
...
...
@@ -205,10 +205,11 @@ vwp_poll_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwp_poll_init
(
void
)
vwp_poll_init
(
waiter_handle_f
*
func
)
{
struct
vwp
*
vwp
;
(
void
)
func
;
ALLOC_OBJ
(
vwp
,
VWP_MAGIC
);
AN
(
vwp
);
VTAILQ_INIT
(
&
vwp
->
sesshead
);
...
...
bin/varnishd/waiter/cache_waiter_ports.c
View file @
917566c1
...
...
@@ -256,10 +256,11 @@ vws_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vws_init
(
void
)
vws_init
(
waiter_handle_f
*
func
)
{
struct
vws
*
vws
;
(
void
)
func
ALLOC_OBJ
(
vws
,
VWS_MAGIC
);
AN
(
vws
);
VTAILQ_INIT
(
&
vws
->
sesshead
);
...
...
bin/varnishd/waiter/waiter.h
View file @
917566c1
...
...
@@ -30,7 +30,14 @@
struct
sess
;
typedef
void
*
waiter_init_f
(
void
);
enum
wait_event
{
WAITER_REMCLOSE
,
WAITER_TIMEOUT
,
WAITER_ACTION
};
typedef
void
waiter_handle_f
(
void
*
ptr
,
int
fd
,
enum
wait_event
);
typedef
void
*
waiter_init_f
(
waiter_handle_f
*
);
typedef
int
waiter_pass_f
(
void
*
priv
,
struct
sess
*
);
#define WAITER_DEFAULT "platform dependent"
...
...
@@ -43,7 +50,7 @@ struct waiter {
/* cache_waiter.c */
int
WAIT_Enter
(
struct
sess
*
sp
);
void
WAIT_Init
(
void
);
void
WAIT_Init
(
waiter_handle_f
*
);
const
char
*
WAIT_GetName
(
void
);
int
WAIT_Write_Session
(
struct
sess
*
sp
,
int
fd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment