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
bf43a647
Commit
bf43a647
authored
Jan 14, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split waiter stuff into private and public headers
parent
3864e664
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
33 deletions
+77
-33
Makefile.am
bin/varnishd/Makefile.am
+2
-1
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+1
-8
cache_waiter_epoll.c
bin/varnishd/waiter/cache_waiter_epoll.c
+1
-0
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+1
-0
cache_waiter_poll.c
bin/varnishd/waiter/cache_waiter_poll.c
+1
-0
cache_waiter_ports.c
bin/varnishd/waiter/cache_waiter_ports.c
+1
-0
mgt_waiter.c
bin/varnishd/waiter/mgt_waiter.c
+1
-0
waiter.h
bin/varnishd/waiter/waiter.h
+3
-24
waiter_priv.h
bin/varnishd/waiter/waiter_priv.h
+66
-0
No files found.
bin/varnishd/Makefile.am
View file @
bf43a647
...
...
@@ -102,7 +102,8 @@ noinst_HEADERS = \
mgt/mgt_param.h
\
storage/storage.h
\
storage/storage_persistent.h
\
waiter/waiter.h
waiter/waiter.h
\
waiter/waiter_priv.h
# Headers for use with vmods
nobase_pkginclude_HEADERS
=
\
...
...
bin/varnishd/waiter/cache_waiter.c
View file @
bf43a647
...
...
@@ -38,14 +38,7 @@
#include "cache/cache.h"
#include "waiter/waiter.h"
struct
waiter
{
unsigned
magic
;
#define WAITER_MAGIC 0x17c399db
const
struct
waiter_impl
*
impl
;
void
*
priv
;
int
pfd
;
};
#include "waiter/waiter_priv.h"
const
char
*
WAIT_GetName
(
void
)
...
...
bin/varnishd/waiter/cache_waiter_epoll.c
View file @
bf43a647
...
...
@@ -42,6 +42,7 @@
#include "cache/cache.h"
#include "waiter/waiter.h"
#include "waiter/waiter_priv.h"
#include "vtim.h"
#include "vfil.h"
...
...
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
bf43a647
...
...
@@ -44,6 +44,7 @@
#include "cache/cache.h"
#include "waiter/waiter.h"
#include "waiter/waiter_priv.h"
#include "vtim.h"
#include "vfil.h"
...
...
bin/varnishd/waiter/cache_waiter_poll.c
View file @
bf43a647
...
...
@@ -37,6 +37,7 @@
#include "cache/cache.h"
#include "waiter/waiter.h"
#include "waiter/waiter_priv.h"
#include "vtim.h"
#include "vfil.h"
...
...
bin/varnishd/waiter/cache_waiter_ports.c
View file @
bf43a647
...
...
@@ -43,6 +43,7 @@
#include "cache/cache.h"
#include "waiter/waiter.h"
#include "waiter/waiter_priv.h"
#include "vtim.h"
#define MAX_EVENTS 256
...
...
bin/varnishd/waiter/mgt_waiter.c
View file @
bf43a647
...
...
@@ -36,6 +36,7 @@
#include "common/common.h"
#include "waiter/waiter.h"
#include "waiter/waiter_priv.h"
static
const
struct
waiter_impl
*
const
waiter_impls
[]
=
{
#if defined(HAVE_KQUEUE)
...
...
bin/varnishd/waiter/waiter.h
View file @
bf43a647
...
...
@@ -38,6 +38,8 @@
* - kqueue on FreeBSD
* - epoll on Linux
* - ports on Solaris
*
* Public interfaces
*/
struct
waited
;
...
...
@@ -49,17 +51,9 @@ enum wait_event {
WAITER_ACTION
};
typedef
void
waiter_handle_f
(
struct
waited
*
,
enum
wait_event
,
double
now
);
typedef
void
*
waiter_init_f
(
waiter_handle_f
*
,
int
*
,
volatile
double
*
);
typedef
int
waiter_pass_f
(
void
*
priv
,
struct
waited
*
);
#define WAITER_DEFAULT "platform dependent"
struct
waiter_impl
{
const
char
*
name
;
waiter_init_f
*
init
;
waiter_pass_f
*
pass
;
};
typedef
void
waiter_handle_f
(
struct
waited
*
,
enum
wait_event
,
double
now
);
/* cache_waiter.c */
int
WAIT_Enter
(
const
struct
waiter
*
,
struct
waited
*
);
...
...
@@ -67,19 +61,4 @@ struct waiter *WAIT_Init(waiter_handle_f *, volatile double *timeout);
const
char
*
WAIT_GetName
(
void
);
/* mgt_waiter.c */
extern
struct
waiter_impl
const
*
waiter
;
int
WAIT_tweak_waiter
(
struct
vsb
*
vsb
,
const
char
*
arg
);
#if defined(HAVE_EPOLL_CTL)
extern
const
struct
waiter_impl
waiter_epoll
;
#endif
#if defined(HAVE_KQUEUE)
extern
const
struct
waiter_impl
waiter_kqueue
;
#endif
#if defined(HAVE_PORT_CREATE)
extern
const
struct
waiter_impl
waiter_ports
;
#endif
extern
const
struct
waiter_impl
waiter_poll
;
bin/varnishd/waiter/waiter_priv.h
0 → 100644
View file @
bf43a647
/*-
* 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.
*
* Private interfaces
*/
struct
waited
;
struct
waiter
{
unsigned
magic
;
#define WAITER_MAGIC 0x17c399db
const
struct
waiter_impl
*
impl
;
void
*
priv
;
int
pfd
;
};
typedef
void
*
waiter_init_f
(
waiter_handle_f
*
,
int
*
,
volatile
double
*
);
typedef
int
waiter_pass_f
(
void
*
priv
,
struct
waited
*
);
struct
waiter_impl
{
const
char
*
name
;
waiter_init_f
*
init
;
waiter_pass_f
*
pass
;
};
/* mgt_waiter.c */
extern
struct
waiter_impl
const
*
waiter
;
#if defined(HAVE_EPOLL_CTL)
extern
const
struct
waiter_impl
waiter_epoll
;
#endif
#if defined(HAVE_KQUEUE)
extern
const
struct
waiter_impl
waiter_kqueue
;
#endif
#if defined(HAVE_PORT_CREATE)
extern
const
struct
waiter_impl
waiter_ports
;
#endif
extern
const
struct
waiter_impl
waiter_poll
;
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