/* cache_acceptor.c */
void vca_write(struct sess *sp, void *ptr, size_t len);
void vca_flush(struct sess *sp);
-void *vca_main(void *arg);
void vca_retire_session(struct sess *sp);
void vca_recycle_session(struct sess *sp);
+void VCA_Init(void);
/* cache_backend.c */
void VBE_Init(void);
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
+#include <pthread.h>
#include <sys/uio.h>
#include <sys/types.h>
static struct event pipe_e;
static int pipes[2];
+static pthread_t vca_thread;
+
#define SESS_IOVS 5
static struct event accept_e[2 * HERITAGE_NSOCKS];
http_RecvHead(sp->http, sp->fd, evb, DealWithSession, sp);
}
-void *
+static void *
vca_main(void *arg)
{
unsigned u;
}
free(sp);
}
+
+/*--------------------------------------------------------------------*/
+
+void
+VCA_Init(void)
+{
+
+ AZ(pthread_create(&vca_thread, NULL, vca_main, NULL));
+}
#include "cli_event.h"
static struct event ev_keepalive;
-static pthread_t vca_thread;
struct hash_slinger *hash;
struct stevedore *stevedore;
VSL_Init();
CacheInitPool();
- AZ(pthread_create(&vca_thread, NULL, vca_main, NULL));
+ VCA_Init();
eb = event_init();
assert(eb != NULL);