[master] a0e052c Rename "struct waiter" to "struct waiter_impl", so we can repurpose the former for an instance of a waiter.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Jan 12 12:55:40 CET 2015
commit a0e052c1ef4609a0adb1dc824987cf45c9cd4f4b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 12 11:55:00 2015 +0000
Rename "struct waiter" to "struct waiter_impl", so we can repurpose
the former for an instance of a waiter.
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index 6f3cff7..bc4573d 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -259,7 +259,7 @@ vwe_init(waiter_handle_f *func)
/*--------------------------------------------------------------------*/
-const struct waiter waiter_epoll = {
+const struct waiter_impl waiter_epoll = {
.name = "epoll",
.init = vwe_init,
.pass = vwe_pass,
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 03e0b12..d1f5a79 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -251,7 +251,7 @@ vwk_init(waiter_handle_f *func)
/*--------------------------------------------------------------------*/
-const struct waiter waiter_kqueue = {
+const struct waiter_impl waiter_kqueue = {
.name = "kqueue",
.init = vwk_init,
.pass = vwk_pass,
diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c
index 3af524b..3a10b26 100644
--- a/bin/varnishd/waiter/cache_waiter_poll.c
+++ b/bin/varnishd/waiter/cache_waiter_poll.c
@@ -227,7 +227,7 @@ vwp_poll_init(waiter_handle_f *func)
/*--------------------------------------------------------------------*/
-const struct waiter waiter_poll = {
+const struct waiter_impl waiter_poll = {
.name = "poll",
.init = vwp_poll_init,
.pass = vwp_poll_pass,
diff --git a/bin/varnishd/waiter/cache_waiter_ports.c b/bin/varnishd/waiter/cache_waiter_ports.c
index eb1581b..9f5a13f 100644
--- a/bin/varnishd/waiter/cache_waiter_ports.c
+++ b/bin/varnishd/waiter/cache_waiter_ports.c
@@ -272,7 +272,7 @@ vws_init(waiter_handle_f *func)
/*--------------------------------------------------------------------*/
-const struct waiter waiter_ports = {
+const struct waiter_impl waiter_ports = {
.name = "ports",
.init = vws_init,
.pass = vws_pass
diff --git a/bin/varnishd/waiter/mgt_waiter.c b/bin/varnishd/waiter/mgt_waiter.c
index c36e089..89f2949 100644
--- a/bin/varnishd/waiter/mgt_waiter.c
+++ b/bin/varnishd/waiter/mgt_waiter.c
@@ -37,7 +37,7 @@
#include "waiter/waiter.h"
-static const struct waiter *const vca_waiters[] = {
+static const struct waiter_impl *const waiter_impls[] = {
#if defined(HAVE_KQUEUE)
&waiter_kqueue,
#endif
@@ -51,7 +51,7 @@ static const struct waiter *const vca_waiters[] = {
NULL,
};
-struct waiter const *waiter;
+struct waiter_impl const *waiter;
int
WAIT_tweak_waiter(struct vsb *vsb, const char *arg)
@@ -67,19 +67,19 @@ WAIT_tweak_waiter(struct vsb *vsb, const char *arg)
VSB_printf(vsb, "%s", waiter->name);
VSB_printf(vsb, " (possible values: ");
- for (i = 0; vca_waiters[i] != NULL; i++)
+ for (i = 0; waiter_impls[i] != NULL; i++)
VSB_printf(vsb, "%s%s", i == 0 ? "" : ", ",
- vca_waiters[i]->name);
+ waiter_impls[i]->name);
VSB_printf(vsb, ")");
return(0);
}
if (!strcmp(arg, WAITER_DEFAULT)) {
- waiter = vca_waiters[0];
+ waiter = waiter_impls[0];
return(0);
}
- for (i = 0; vca_waiters[i]; i++) {
- if (!strcmp(arg, vca_waiters[i]->name)) {
- waiter = vca_waiters[i];
+ for (i = 0; waiter_impls[i]; i++) {
+ if (!strcmp(arg, waiter_impls[i]->name)) {
+ waiter = waiter_impls[i];
return(0);
}
}
diff --git a/bin/varnishd/waiter/waiter.h b/bin/varnishd/waiter/waiter.h
index b16ad79..5ea4720 100644
--- a/bin/varnishd/waiter/waiter.h
+++ b/bin/varnishd/waiter/waiter.h
@@ -42,7 +42,7 @@ typedef int waiter_pass_f(void *priv, struct sess *);
#define WAITER_DEFAULT "platform dependent"
-struct waiter {
+struct waiter_impl {
const char *name;
waiter_init_f *init;
waiter_pass_f *pass;
@@ -55,19 +55,19 @@ const char *WAIT_GetName(void);
int WAIT_Write_Session(struct sess *sp, int fd);
/* mgt_waiter.c */
-extern struct waiter const * waiter;
+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 waiter_epoll;
+extern const struct waiter_impl waiter_epoll;
#endif
#if defined(HAVE_KQUEUE)
-extern const struct waiter waiter_kqueue;
+extern const struct waiter_impl waiter_kqueue;
#endif
#if defined(HAVE_PORT_CREATE)
-extern const struct waiter waiter_ports;
+extern const struct waiter_impl waiter_ports;
#endif
-extern const struct waiter waiter_poll;
+extern const struct waiter_impl waiter_poll;
More information about the varnish-commit
mailing list