summaryrefslogtreecommitdiffstats
path: root/04_exercise/slotmap/slotmap.h
diff options
context:
space:
mode:
authorStefan Zabka <zabkaste@hu-berlin.de>2020-06-22 16:43:42 +0200
committerStefan Zabka <zabkaste@hu-berlin.de>2020-06-22 16:43:42 +0200
commit239f248456ad00f894dc26dceefa968898738c9d (patch)
tree14d41af555b12c88401d8bb46bae9f4319497b62 /04_exercise/slotmap/slotmap.h
parent021afcb8e4aa4fbc7905f527089c415108c86c75 (diff)
downloadbetriebssysteme-239f248456ad00f894dc26dceefa968898738c9d.tar.gz
betriebssysteme-239f248456ad00f894dc26dceefa968898738c9d.zip
Getting make to run
Diffstat (limited to '04_exercise/slotmap/slotmap.h')
-rw-r--r--04_exercise/slotmap/slotmap.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/04_exercise/slotmap/slotmap.h b/04_exercise/slotmap/slotmap.h
deleted file mode 100644
index 1d687fc..0000000
--- a/04_exercise/slotmap/slotmap.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Created by stefan on 18.06.20.
-//
-
-#ifndef BETRIEBSYSTEME_SLOTMAP_H
-#define BETRIEBSYSTEME_SLOTMAP_H
-#include <stdatomic.h>
-#include <stdlib.h>
-#include <stdbool.h>
-
-typedef struct smNode {
- atomic_intptr_t value;
-} smEntry;
-
-typedef struct smHeader {
- smEntry *slab;
- size_t size;
-} smHeader;
-
-typedef bool (*SearchFunction)(void const *);
-
-smHeader smInit(smEntry * slab, size_t size);
-int smInsert(smHeader const * header, void * value);
-void smDelete(smEntry * node);
-void smDeleteValue(smHeader const * header, void * value);
-/**
- * Returns a node whose value is accepted by the SearchFunction
- * @param header The header of the slotmap to be searched
- * @param func The search function, that will be applied to each element until one is found
- * @return the Entry that was found
- */
-smEntry *smFindEntry(smHeader const * header, SearchFunction func);
-
-
-
-#endif // BETRIEBSYSTEME_SLOTMAP_H