if (hash->start != NULL)
hash->start();
}
+
+const struct choice hsh_choice[] = {
+ { "classic", &hcl_slinger },
+ { "simple", &hsl_slinger },
+ { "simple_list", &hsl_slinger }, /* backwards compat */
+ { "critbit", &hcb_slinger },
+ { NULL, NULL }
+};
void HSH_DeleteObjHead(const struct worker *w, struct objhead *oh);
void HSH_Deref(const struct worker *w, struct object **o);
#endif /* VARNISH_CACHE_CHILD */
+
+extern struct hash_slinger hsl_slinger;
+extern struct hash_slinger hcl_slinger;
+extern struct hash_slinger hcb_slinger;
+extern const struct choice hsh_choice[];
/*--------------------------------------------------------------------*/
-struct choice {
- const char *name;
- void *ptr;
-};
-
static void *
pick(const struct choice *cp, const char *which, const char *kind)
{
}
/*--------------------------------------------------------------------*/
-extern struct stevedore sma_stevedore;
-extern struct stevedore smf_stevedore;
-#ifdef HAVE_LIBUMEM
-extern struct stevedore smu_stevedore;
-#endif
-
-static const struct choice stv_choice[] = {
- { "file", &smf_stevedore },
- { "malloc", &sma_stevedore },
-#ifdef HAVE_LIBUMEM
- { "umem", &smu_stevedore },
-#endif
- { NULL, NULL }
-};
static void
setup_storage(const char *spec)
for (ac = 0; av[ac + 2] != NULL; ac++)
continue;
- priv = pick(stv_choice, av[1], "storage");
+ priv = pick(STV_choice, av[1], "storage");
AN(priv);
STV_add(priv, ac, av + 2);
/*--------------------------------------------------------------------*/
-extern struct hash_slinger hsl_slinger;
-extern struct hash_slinger hcl_slinger;
-extern struct hash_slinger hcb_slinger;
-
-static const struct choice hsh_choice[] = {
- { "classic", &hcl_slinger },
- { "simple", &hsl_slinger },
- { "simple_list", &hsl_slinger }, /* backwards compat */
- { "critbit", &hcb_slinger },
- { NULL, NULL }
-};
-
static void
setup_hash(const char *h_arg)
{