aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hashlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hashlib.h')
-rw-r--r--kernel/hashlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/hashlib.h b/kernel/hashlib.h
index 3cc95b6e4..4f5a353c5 100644
--- a/kernel/hashlib.h
+++ b/kernel/hashlib.h
@@ -162,6 +162,11 @@ struct hash_obj_ops {
}
};
+template<typename T>
+inline unsigned int mkhash(const T &v) {
+ return hash_ops<T>().hash(v);
+}
+
inline int hashtable_size(int min_size)
{
static std::vector<int> zero_and_some_primes = {