From cbd21e1da0d763225e7ea3594d4e6d8e96863790 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 30 May 2023 23:05:30 +0200 Subject: Added hash-based approach --- inc/map.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 inc/map.h (limited to 'inc/map.h') diff --git a/inc/map.h b/inc/map.h new file mode 100644 index 0000000..84d1ae5 --- /dev/null +++ b/inc/map.h @@ -0,0 +1,16 @@ +// Copyright (c) 2023, Marvin Borner +// SPDX-License-Identifier: MIT + +#ifndef SHARING_MAP_H +#define SHARING_MAP_H + +#include + +struct term *map_get(hash_t hash); +void map_set(struct term *term, hash_t hash); +void map_delete(struct term *term); +void map_initialize(void); +void map_destroy(void); +void map_foreach(void (*func)(struct term *)); + +#endif -- cgit v1.2.3