summaryrefslogtreecommitdiff
path: root/include/ouroboros/shm_du_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ouroboros/shm_du_map.h')
-rw-r--r--include/ouroboros/shm_du_map.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/ouroboros/shm_du_map.h b/include/ouroboros/shm_du_map.h
index fb51768d..f575aa42 100644
--- a/include/ouroboros/shm_du_map.h
+++ b/include/ouroboros/shm_du_map.h
@@ -44,14 +44,23 @@ struct shm_du_map;
struct shm_du_map * shm_du_map_create();
struct shm_du_map * shm_du_map_open();
void shm_du_map_close(struct shm_du_map * dum);
+void shm_du_map_destroy(struct shm_du_map * dum);
-struct shm_du_buff * shm_create_du_buff(struct shm_du_map * dum,
- size_t size,
- size_t headspace,
- uint8_t * data,
- size_t len);
-int shm_release_du_buff(struct shm_du_map * dum);
+/* returns the index of the buffer in the DU map */
+int shm_create_du_buff(struct shm_du_map * dum,
+ size_t size,
+ size_t headspace,
+ uint8_t * data,
+ size_t len);
+/* FIXME: revise these */
+int shm_du_map_read_sdu(uint8_t ** dst,
+ struct shm_du_map * dum,
+ size_t idx);
+int shm_release_du_buff(struct shm_du_map * dum, size_t idx);
+
+
+/* FIXME: use shm_du_map * and index */
uint8_t * shm_du_buff_head_alloc(struct shm_du_buff * sdb,
size_t size);
uint8_t * shm_du_buff_tail_alloc(struct shm_du_buff * sdb,