That way we can use them for definition of additional hash_ops that map
pidrefs to arbitrary other resources.
return pidref && pid_is_automatic(pidref->pid);
}
-static void pidref_hash_func(const PidRef *pidref, struct siphash *state) {
+void pidref_hash_func(const PidRef *pidref, struct siphash *state) {
siphash24_compress_typesafe(pidref->pid, state);
}
-static int pidref_compare_func(const PidRef *a, const PidRef *b) {
+int pidref_compare_func(const PidRef *a, const PidRef *b) {
return CMP(a->pid, b->pid);
}
#define TAKE_PIDREF(p) TAKE_GENERIC((p), PidRef, PIDREF_NULL)
+struct siphash;
+void pidref_hash_func(const PidRef *pidref, struct siphash *state);
+int pidref_compare_func(const PidRef *a, const PidRef *b);
+
extern const struct hash_ops pidref_hash_ops;
extern const struct hash_ops pidref_hash_ops_free; /* Has destructor call for pidref_free(), i.e. expects heap allocated PidRef as keys */