varnishd_SOURCES = \
cache_acceptor.c \
- cache_acceptor_epoll.c \
- cache_acceptor_kqueue.c \
- cache_acceptor_poll.c \
- cache_acceptor_ports.c \
+ cache_waiter_epoll.c \
+ cache_waiter_kqueue.c \
+ cache_waiter_poll.c \
+ cache_waiter_ports.c \
cache_backend.c \
cache_backend_cfg.c \
cache_backend_poll.c \
noinst_HEADERS = \
acct_fields.h \
cache.h \
- cache_acceptor.h \
+ cache_waiter.h \
cache_backend.h \
cache_backend_poll.h \
common.h \
#include "cli_priv.h"
#include "shmlog.h"
#include "cache.h"
-#include "cache_acceptor.h"
+#include "cache_waiter.h"
-static struct acceptor * const vca_acceptors[] = {
+static struct waiter * const vca_waiters[] = {
#if defined(HAVE_KQUEUE)
- &acceptor_kqueue,
+ &waiter_kqueue,
#endif
#if defined(HAVE_EPOLL_CTL)
- &acceptor_epoll,
+ &waiter_epoll,
#endif
#if defined(HAVE_PORT_CREATE)
- &acceptor_ports,
+ &waiter_ports,
#endif
- &acceptor_poll,
+ &waiter_poll,
NULL,
};
-static struct acceptor const *vca_act;
+static struct waiter const *vca_act;
static pthread_t vca_thread_acct;
static struct timeval tv_sndtimeo;
(void)priv;
if (vca_act == NULL)
- vca_act = vca_acceptors[0];
+ vca_act = vca_waiters[0];
AN(vca_act);
AN(vca_act->name);
}
void
-VCA_tweak_acceptor(struct cli *cli, const char *arg)
+VCA_tweak_waiter(struct cli *cli, const char *arg)
{
int i;
cli_out(cli, "%s", vca_act->name);
cli_out(cli, " (");
- for (i = 0; vca_acceptors[i] != NULL; i++)
+ for (i = 0; vca_waiters[i] != NULL; i++)
cli_out(cli, "%s%s", i == 0 ? "" : ", ",
- vca_acceptors[i]->name);
+ vca_waiters[i]->name);
cli_out(cli, ")");
return;
}
vca_act = NULL;
return;
}
- for (i = 0; vca_acceptors[i]->name; i++) {
- if (!strcmp(arg, vca_acceptors[i]->name)) {
- vca_act = vca_acceptors[i];
+ for (i = 0; vca_waiters[i]->name; i++) {
+ if (!strcmp(arg, vca_waiters[i]->name)) {
+ vca_act = vca_waiters[i];
return;
}
}
- cli_out(cli, "Unknown acceptor");
+ cli_out(cli, "Unknown waiter");
cli_result(cli, CLIS_PARAM);
}
struct sess;
-typedef void acceptor_init_f(void);
-typedef void acceptor_pass_f(struct sess *);
+typedef void waiter_init_f(void);
+typedef void waiter_pass_f(struct sess *);
extern int vca_pipes[2];
-struct acceptor {
+struct waiter {
const char *name;
- acceptor_init_f *init;
- acceptor_pass_f *pass;
+ waiter_init_f *init;
+ waiter_pass_f *pass;
};
#if defined(HAVE_EPOLL_CTL)
-extern struct acceptor acceptor_epoll;
+extern struct waiter waiter_epoll;
#endif
#if defined(HAVE_KQUEUE)
-extern struct acceptor acceptor_kqueue;
+extern struct waiter waiter_kqueue;
#endif
-extern struct acceptor acceptor_poll;
+extern struct waiter waiter_poll;
#if defined(HAVE_PORT_CREATE)
-extern struct acceptor acceptor_ports;
+extern struct waiter waiter_ports;
#endif
/* vca_acceptor.c */
#include "shmlog.h"
#include "cache.h"
-#include "cache_acceptor.h"
+#include "cache_waiter.h"
static pthread_t vca_epoll_thread;
static int epfd = -1;
AZ(pthread_create(&vca_epoll_thread, NULL, vca_main, NULL));
}
-struct acceptor acceptor_epoll = {
+struct waiter waiter_epoll = {
.name = "epoll",
.init = vca_epoll_init,
};
#include "shmlog.h"
#include "cache.h"
-#include "cache_acceptor.h"
+#include "cache_waiter.h"
/**********************************************************************/
AZ(pthread_create(&vca_kqueue_thread, NULL, vca_kqueue_main, NULL));
}
-struct acceptor acceptor_kqueue = {
+struct waiter waiter_kqueue = {
.name = "kqueue",
.init = vca_kqueue_init,
};
#include "shmlog.h"
#include "cache.h"
-#include "cache_acceptor.h"
+#include "cache_waiter.h"
static pthread_t vca_poll_thread;
static struct pollfd *pollfd;
AZ(pthread_create(&vca_poll_thread, NULL, vca_main, NULL));
}
-struct acceptor acceptor_poll = {
+struct waiter waiter_poll = {
.name = "poll",
.init = vca_poll_init,
};
#include "shmlog.h"
#include "cache.h"
-#include "cache_acceptor.h"
+#include "cache_waiter.h"
#define MAX_EVENTS 256
static pthread_t vca_ports_thread;
AZ(pthread_create(&vca_ports_thread, NULL, vca_main, NULL));
}
-struct acceptor acceptor_ports = {
+struct waiter waiter_ports = {
.name = "ports",
.init = vca_ports_init,
.pass = vca_ports_pass
struct sockaddr;
/* cache_acceptor.c */
-void VCA_tweak_acceptor(struct cli *cli, const char *arg);
+void VCA_tweak_waiter(struct cli *cli, const char *arg);
/* shmlog.c */
void VSL_Panic(int *len, char **ptr);
/*--------------------------------------------------------------------*/
static void
-tweak_acceptor(struct cli *cli, const struct parspec *par, const char *arg)
+tweak_waiter(struct cli *cli, const struct parspec *par, const char *arg)
{
/* XXX should have tweak_generic_string */
(void)par;
- VCA_tweak_acceptor(cli, arg);
+ VCA_tweak_waiter(cli, arg);
}
/*--------------------------------------------------------------------*/
"completing.\n"
"Setting this too high results in worker threads not doing "
"anything for their keep, setting it too low just means that "
- "more sessions take a detour around the acceptor.",
+ "more sessions take a detour around the waiter.",
EXPERIMENTAL,
"0", "ms" },
{ "cli_buffer", tweak_uint, &master.cli_buffer, 4096, UINT_MAX,
"SessionOpen shared memory record.\n",
0,
"off", "bool" },
- { "acceptor", tweak_acceptor, NULL, 0, 0,
- "Select the acceptor kernel interface.\n",
+ { "waiter", tweak_waiter, NULL, 0, 0,
+ "Select the waiter kernel interface.\n",
EXPERIMENTAL | MUST_RESTART,
"default", NULL },
{ "diag_bitmap", tweak_diag_bitmap, 0, 0, 0,