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
55d8e88d
Commit
55d8e88d
authored
Dec 19, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split waiter::cache and waiter:mgt out from waiter::common
parent
23e4c603
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
77 additions
and
40 deletions
+77
-40
Makefile.am
bin/varnishd/Makefile.am
+3
-2
cache_main.c
bin/varnishd/cache/cache_main.c
+1
-1
cache_panic.c
bin/varnishd/cache/cache_panic.c
+1
-1
cache_pool.c
bin/varnishd/cache/cache_pool.c
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+1
-1
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+1
-1
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+58
-0
cache_waiter_epoll.c
bin/varnishd/waiter/cache_waiter_epoll.c
+1
-1
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+1
-1
cache_waiter_poll.c
bin/varnishd/waiter/cache_waiter_poll.c
+1
-1
cache_waiter_ports.c
bin/varnishd/waiter/cache_waiter_ports.c
+1
-1
mgt_waiter.c
bin/varnishd/waiter/mgt_waiter.c
+4
-27
waiter.h
bin/varnishd/waiter/waiter.h
+3
-2
No files found.
bin/varnishd/Makefile.am
View file @
55d8e88d
...
...
@@ -76,7 +76,8 @@ varnishd_SOURCES = \
storage/storage_persistent_subr.c
\
storage/storage_synth.c
\
storage/storage_umem.c
\
waiter/waiter_common.c
\
waiter/mgt_waiter.c
\
waiter/cache_waiter.c
\
waiter/cache_waiter_epoll.c
\
waiter/cache_waiter_kqueue.c
\
waiter/cache_waiter_poll.c
\
...
...
@@ -96,7 +97,7 @@ noinst_HEADERS = \
mgt/mgt_param.h
\
storage/storage.h
\
storage/storage_persistent.h
\
waiter/
cache_
waiter.h
waiter/waiter.h
varnishd_CFLAGS
=
\
@PCRE_CFLAGS@
\
...
...
bin/varnishd/cache/cache_main.c
View file @
55d8e88d
...
...
@@ -35,7 +35,7 @@
#include "cache.h"
#include "common/heritage.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "hash/hash_slinger.h"
volatile
struct
params
*
cache_param
;
...
...
bin/varnishd/cache/cache_panic.c
View file @
55d8e88d
...
...
@@ -42,7 +42,7 @@
#include "common/heritage.h"
#include "cache_backend.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vcl.h"
/*
...
...
bin/varnishd/cache/cache_pool.c
View file @
55d8e88d
...
...
@@ -48,7 +48,7 @@
#include "cache.h"
#include "common/heritage.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vtcp.h"
#include "vtim.h"
...
...
bin/varnishd/cache/cache_session.c
View file @
55d8e88d
...
...
@@ -40,7 +40,7 @@
#include "cache.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/mgt/mgt_param.c
View file @
55d8e88d
...
...
@@ -43,7 +43,7 @@
#include "common/params.h"
#include "mgt/mgt_param.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vav.h"
#include "vcli.h"
#include "vcli_common.h"
...
...
bin/varnishd/waiter/cache_waiter.c
0 → 100644
View file @
55d8e88d
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2011 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include "config.h"
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "common/common.h"
#include "waiter/waiter.h"
const
char
*
WAIT_GetName
(
void
)
{
if
(
waiter
!=
NULL
)
return
(
waiter
->
name
);
else
return
(
"no_waiter"
);
}
void
WAIT_Init
(
void
)
{
AN
(
waiter
);
AN
(
waiter
->
name
);
AN
(
waiter
->
init
);
AN
(
waiter
->
pass
);
}
bin/varnishd/waiter/cache_waiter_epoll.c
View file @
55d8e88d
...
...
@@ -42,7 +42,7 @@
#include "cache/cache.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vtim.h"
#ifndef EPOLLRDHUP
...
...
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
55d8e88d
...
...
@@ -44,7 +44,7 @@
#include "cache/cache.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vtim.h"
#define NKEV 100
...
...
bin/varnishd/waiter/cache_waiter_poll.c
View file @
55d8e88d
...
...
@@ -35,7 +35,7 @@
#include "cache/cache.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vtim.h"
#define NEEV 128
...
...
bin/varnishd/waiter/cache_waiter_ports.c
View file @
55d8e88d
...
...
@@ -42,7 +42,7 @@
#include "cache/cache.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vtim.h"
#define MAX_EVENTS 256
...
...
bin/varnishd/waiter/
waiter_common
.c
→
bin/varnishd/waiter/
mgt_waiter
.c
View file @
55d8e88d
...
...
@@ -35,11 +35,11 @@
#include "common/common.h"
#include "waiter/
cache_
waiter.h"
#include "waiter/waiter.h"
#include "vcli.h"
#include "vcli_priv.h"
static
const
struct
waiter
*
const
vca_waiters
[]
=
{
static
const
struct
waiter
*
const
vca_waiters
[]
=
{
#if defined(HAVE_KQUEUE)
&
waiter_kqueue
,
#endif
...
...
@@ -53,17 +53,7 @@ static const struct waiter * const vca_waiters[] = {
NULL
,
};
struct
waiter
const
*
waiter
;
const
char
*
WAIT_GetName
(
void
)
{
if
(
waiter
!=
NULL
)
return
(
waiter
->
name
);
else
return
(
"no_waiter"
);
}
struct
waiter
const
*
waiter
;
void
WAIT_tweak_waiter
(
struct
cli
*
cli
,
const
char
*
arg
)
...
...
@@ -86,7 +76,7 @@ WAIT_tweak_waiter(struct cli *cli, const char *arg)
return
;
}
if
(
!
strcmp
(
arg
,
"default"
))
{
waiter
=
NULL
;
waiter
=
vca_waiters
[
0
]
;
return
;
}
for
(
i
=
0
;
vca_waiters
[
i
];
i
++
)
{
...
...
@@ -98,16 +88,3 @@ WAIT_tweak_waiter(struct cli *cli, const char *arg)
VCLI_Out
(
cli
,
"Unknown waiter"
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
}
void
WAIT_Init
(
void
)
{
if
(
waiter
==
NULL
)
waiter
=
vca_waiters
[
0
];
AN
(
waiter
);
AN
(
waiter
->
name
);
AN
(
waiter
->
init
);
AN
(
waiter
->
pass
);
}
bin/varnishd/waiter/
cache_
waiter.h
→
bin/varnishd/waiter/waiter.h
View file @
55d8e88d
...
...
@@ -39,7 +39,9 @@ struct waiter {
waiter_pass_f
*
pass
;
};
/* mgt_waiter.c */
extern
struct
waiter
const
*
waiter
;
void
WAIT_tweak_waiter
(
struct
cli
*
cli
,
const
char
*
arg
);
#if defined(HAVE_EPOLL_CTL)
extern
const
struct
waiter
waiter_epoll
;
...
...
@@ -53,12 +55,11 @@ extern const struct waiter waiter_kqueue;
extern
const
struct
waiter
waiter_ports
;
#endif
extern
const
struct
waiter
waiter_poll
;
/* cache_session.c */
void
SES_Handle
(
struct
sess
*
sp
,
int
status
);
/* cache_waiter.c */
extern
const
struct
waiter
waiter_poll
;
const
char
*
WAIT_GetName
(
void
);
void
WAIT_tweak_waiter
(
struct
cli
*
cli
,
const
char
*
arg
);
void
WAIT_Init
(
void
);
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