summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-07-11 22:11:36 +0200
committerdimitri staessens <[email protected]>2016-07-11 22:28:33 +0200
commite04defa422bd7d365d9d8389fde13e675e9783a2 (patch)
tree97858c114caf656a94d4267fa599b272e19d6725 /include
parent39462e9b22509f59e9fa9afb8eec31988c21dece (diff)
downloadouroboros-e04defa422bd7d365d9d8389fde13e675e9783a2.tar.gz
ouroboros-e04defa422bd7d365d9d8389fde13e675e9783a2.zip
lib: shm_du_map: PCI allocation / deallocation
Correct implementation of allocation for the Protocol Control Information. Also removes stale code checking for a corner case when the du map still wrapped multi-block SDU's.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/shm_du_map.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/ouroboros/shm_du_map.h b/include/ouroboros/shm_du_map.h
index 23c0c3aa..11fe35c6 100644
--- a/include/ouroboros/shm_du_map.h
+++ b/include/ouroboros/shm_du_map.h
@@ -50,16 +50,18 @@ int shm_du_map_read(uint8_t ** dst,
struct shm_du_map * dum,
ssize_t idx);
int shm_du_map_remove(struct shm_du_map * dum,
- ssize_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,
- size_t size);
-int shm_du_buff_head_release(struct shm_du_buff * sdb,
- size_t size);
-int shm_du_buff_tail_release(struct shm_du_buff * sdb,
- size_t size);
+ ssize_t idx);
+uint8_t * shm_du_buff_head_alloc(struct shm_du_map * dum,
+ int idx,
+ ssize_t size);
+uint8_t * shm_du_buff_tail_alloc(struct shm_du_map * dum,
+ int idx,
+ ssize_t size);
+int shm_du_buff_head_release(struct shm_du_map * dum,
+ int idx,
+ ssize_t size);
+int shm_du_buff_tail_release(struct shm_du_map * dum,
+ int idx,
+ ssize_t size);
#endif /* OUROBOROS_SHM_DU_MAP_H */