From cf344012104c65a83d094d0a4a414f9c4ca1afba Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:09:10 +0200 Subject: [PATCH] Mon 14 Oct 23:06:38 CEST 2024 --- kernel/hash_set.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 kernel/hash_set.h diff --git a/kernel/hash_set.h b/kernel/hash_set.h new file mode 100644 index 0000000..81c94d4 --- /dev/null +++ b/kernel/hash_set.h @@ -0,0 +1,21 @@ +/* +Copyright (C) 2016-2019 The University of Notre Dame +This software is distributed under the GNU General Public License. +See the file LICENSE for details. +*/ + +#ifndef HASH_SET_H +#define HASH_SET_H + +#include "kernel/types.h" + +struct hash_set *hash_set_create(unsigned max_expected_keys); +void hash_set_delete(struct hash_set *set); + +unsigned hash_set_add(struct hash_set *set, unsigned key, void *data); +void * hash_set_lookup(struct hash_set *set, unsigned key); +unsigned hash_set_remove(struct hash_set *set, unsigned key); +unsigned hash_set_entries(struct hash_set *set); +void hash_set_print(struct hash_set *set); + +#endif