From 35c43358a110758090b48dd18628bb285ffddfc6 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 8 Nov 2017 19:25:48 +0100 Subject: lib: Use packed struct for FRCT header access This replaces the variable FRCT header with a packed struct, which significantly simplifies the implementation. The shm_du_buff calls to release the head/tail are updated to return a pointer to the original head or the new tail (in symmetry to the alloc calls, which return a pointer to the new head and old tail), so that it immediately points to the structure that is needed. The frct_pci sources are removed and frct is now fully in the frct.c source file. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- include/ouroboros/shm_du_buff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ouroboros') diff --git a/include/ouroboros/shm_du_buff.h b/include/ouroboros/shm_du_buff.h index c558f378..04e17cf4 100644 --- a/include/ouroboros/shm_du_buff.h +++ b/include/ouroboros/shm_du_buff.h @@ -40,10 +40,10 @@ uint8_t * shm_du_buff_head_alloc(struct shm_du_buff * sdb, uint8_t * shm_du_buff_tail_alloc(struct shm_du_buff * sdb, size_t size); -void shm_du_buff_head_release(struct shm_du_buff * sdb, +uint8_t * shm_du_buff_head_release(struct shm_du_buff * sdb, size_t size); -void shm_du_buff_tail_release(struct shm_du_buff * sdb, +uint8_t * shm_du_buff_tail_release(struct shm_du_buff * sdb, size_t size); void shm_du_buff_truncate(struct shm_du_buff * sdb, -- cgit v1.2.3