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
8ff174a4
Commit
8ff174a4
authored
Jan 12, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a pointer arg for waiter->init to generalize the handling
for waiters which pass over a pipe.
parent
bbf9e25b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
11 deletions
+17
-11
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+4
-2
cache_waiter_epoll.c
bin/varnishd/waiter/cache_waiter_epoll.c
+3
-2
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+3
-2
cache_waiter_poll.c
bin/varnishd/waiter/cache_waiter_poll.c
+3
-2
cache_waiter_ports.c
bin/varnishd/waiter/cache_waiter_ports.c
+3
-2
waiter.h
bin/varnishd/waiter/waiter.h
+1
-1
No files found.
bin/varnishd/waiter/cache_waiter.c
View file @
8ff174a4
...
...
@@ -44,6 +44,7 @@ struct waiter {
#define WAITER_MAGIC 0x17c399db
const
struct
waiter_impl
*
impl
;
void
*
priv
;
int
pfd
;
};
const
char
*
...
...
@@ -63,13 +64,14 @@ WAIT_Init(waiter_handle_f *func)
ALLOC_OBJ
(
w
,
WAITER_MAGIC
);
AN
(
w
);
w
->
pfd
=
-
1
;
AN
(
waiter
);
AN
(
waiter
->
name
);
AN
(
waiter
->
init
);
AN
(
waiter
->
pass
);
w
->
impl
=
waiter
;
w
->
priv
=
w
->
impl
->
init
(
func
);
w
->
priv
=
w
->
impl
->
init
(
func
,
&
w
->
pfd
);
AN
(
waiter
->
pass
||
w
->
pfd
>=
0
);
return
(
w
);
}
...
...
bin/varnishd/waiter/cache_waiter_epoll.c
View file @
8ff174a4
...
...
@@ -233,12 +233,13 @@ vwe_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwe_init
(
waiter_handle_f
*
func
)
static
void
*
__match_proto__
(
waiter_init_f
)
vwe_init
(
waiter_handle_f
*
func
,
int
*
pfd
)
{
struct
vwe
*
vwe
;
AN
(
func
);
AN
(
pfd
);
ALLOC_OBJ
(
vwe
,
VWE_MAGIC
);
AN
(
vwe
);
VTAILQ_INIT
(
&
vwe
->
sesshead
);
...
...
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
8ff174a4
...
...
@@ -228,12 +228,13 @@ vwk_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwk_init
(
waiter_handle_f
*
func
)
static
void
*
__match_proto__
(
waiter_init_f
)
vwk_init
(
waiter_handle_f
*
func
,
int
*
pfd
)
{
struct
vwk
*
vwk
;
AN
(
func
);
AN
(
pfd
);
ALLOC_OBJ
(
vwk
,
VWK_MAGIC
);
AN
(
vwk
);
...
...
bin/varnishd/waiter/cache_waiter_poll.c
View file @
8ff174a4
...
...
@@ -205,12 +205,13 @@ vwp_poll_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vwp_poll_init
(
waiter_handle_f
*
func
)
static
void
*
__match_proto__
(
waiter_init_f
)
vwp_poll_init
(
waiter_handle_f
*
func
,
int
*
pfd
)
{
struct
vwp
*
vwp
;
AN
(
func
);
AN
(
pfd
);
ALLOC_OBJ
(
vwp
,
VWP_MAGIC
);
AN
(
vwp
);
VTAILQ_INIT
(
&
vwp
->
sesshead
);
...
...
bin/varnishd/waiter/cache_waiter_ports.c
View file @
8ff174a4
...
...
@@ -256,12 +256,13 @@ vws_pass(void *priv, struct sess *sp)
/*--------------------------------------------------------------------*/
static
void
*
vws_init
(
waiter_handle_f
*
func
)
static
void
*
__match_proto__
(
waiter_init_f
)
vws_init
(
waiter_handle_f
*
func
,
int
*
pfd
)
{
struct
vws
*
vws
;
AN
(
func
);
AN
(
pfd
);
ALLOC_OBJ
(
vws
,
VWS_MAGIC
);
AN
(
vws
);
vws
->
func
=
func
;
...
...
bin/varnishd/waiter/waiter.h
View file @
8ff174a4
...
...
@@ -38,7 +38,7 @@ enum wait_event {
};
typedef
void
waiter_handle_f
(
void
*
ptr
,
int
fd
,
enum
wait_event
,
double
now
);
typedef
void
*
waiter_init_f
(
waiter_handle_f
*
);
typedef
void
*
waiter_init_f
(
waiter_handle_f
*
,
int
*
);
typedef
int
waiter_pass_f
(
void
*
priv
,
struct
sess
*
);
#define WAITER_DEFAULT "platform dependent"
...
...
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