summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-16 23:31:51 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-05-16 23:31:51 +0200
commit8130973653ec66fc8cc7a35f8fe4d3d19750ad50 (patch)
treec552c75886dd88eb9ebdc3e31ea92df17df1f7fd /include
parentcd14d5db7abdb12b5e46a6c055daf5304bb43b74 (diff)
parentca914eb17bfdb2e56a39951a96a9fb54e1a5f607 (diff)
downloadouroboros-8130973653ec66fc8cc7a35f8fe4d3d19750ad50.tar.gz
ouroboros-8130973653ec66fc8cc7a35f8fe4d3d19750ad50.zip
Merged in sandervrijders/ouroboros/be (pull request #96)
lib: Add missing modulo calculation
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/shm_ap_rbuff.h4
-rw-r--r--include/ouroboros/shm_du_map.h20
2 files changed, 12 insertions, 12 deletions
diff --git a/include/ouroboros/shm_ap_rbuff.h b/include/ouroboros/shm_ap_rbuff.h
index 0ee3e81e..956a9540 100644
--- a/include/ouroboros/shm_ap_rbuff.h
+++ b/include/ouroboros/shm_ap_rbuff.h
@@ -37,8 +37,8 @@
struct shm_ap_rbuff;
struct rb_entry {
- size_t index;
- int port_id;
+ ssize_t index;
+ int port_id;
};
struct shm_ap_rbuff * shm_ap_rbuff_create();
diff --git a/include/ouroboros/shm_du_map.h b/include/ouroboros/shm_du_map.h
index f575aa42..35d85b11 100644
--- a/include/ouroboros/shm_du_map.h
+++ b/include/ouroboros/shm_du_map.h
@@ -47,18 +47,18 @@ void shm_du_map_close(struct shm_du_map * dum);
void shm_du_map_destroy(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);
+ssize_t 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);
-
+int shm_du_map_read_sdu(uint8_t ** dst,
+ struct shm_du_map * dum,
+ ssize_t idx);
+int shm_release_du_buff(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,