#include "stevedore.h"
-/*
- * XXX: in the longer term, we want to support multiple stevedores,
- * XXX: selected by some kind of heuristics based on size, lifetime
- * XXX: etc etc. For now we support only one.
- */
-extern struct stevedore_head *stevedore_h;
-
/* -------------------------------------------------------------------*/
struct object {
#include "shmlog.h"
#include "cache.h"
-struct stevedore_head *stevedore_h;
/*--------------------------------------------------------------------
* XXX: Think more about which order we start things
void
child_main(void)
{
- struct stevedore *st;
-
setbuf(stdout, NULL);
setbuf(stderr, NULL);
printf("Child starts\n");
HSH_Init();
BAN_Init();
- stevedore_h = &heritage.stevedore_h;
- TAILQ_FOREACH(st, stevedore_h, stevedore_list) {
- if (st->open != NULL)
- st->open(st);
- }
-
+ STV_open();
+
printf("Ready\n");
VSL_stats->start_time = (time_t)TIM_real();
{
struct storage *st;
struct stevedore *stv, *stv_first;
+ struct stevedore_head *stevedore_h = &heritage.stevedore_h;
/* Simple round robin selecting of a stevedore.
*/
return (0);
}
-
void
STV_add(const char *spec)
{
if (stp->init != NULL)
stp->init(stp, q);
}
+
+void
+STV_open(void)
+{
+ struct stevedore_head *stevedore_h;
+ struct stevedore *st;
+
+ stevedore_h = &heritage.stevedore_h;
+ TAILQ_FOREACH(st, stevedore_h, stevedore_list) {
+ if (st->open != NULL)
+ st->open(st);
+ }
+}
void STV_trim(struct storage *st, size_t size);
void STV_free(struct storage *st);
void STV_add(const char *spec);
+void STV_open(void);