From 963537079c7d5a9f9fb39355fb0e3b84a78eaa0b Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 26 Oct 2016 19:30:52 +0200 Subject: lib, ipcpd: Further stabilization of flows The steps for flow deallocation have been further refined. An operation ipcp_flow_fini() which wait for all SDUs to be read from a flow has been added. The shim IPCPs and the local IPCP have been adapted to this new API. Deallocation messages have been removed from the shim IPCPs, since there is insufficient state synchronisation between them to make this work reliably. --- include/ouroboros/ipcp-dev.h | 2 ++ include/ouroboros/shm_rbuff.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ouroboros/ipcp-dev.h b/include/ouroboros/ipcp-dev.h index 3ab05bd7..ee7c83ad 100644 --- a/include/ouroboros/ipcp-dev.h +++ b/include/ouroboros/ipcp-dev.h @@ -45,6 +45,8 @@ int ipcp_flow_read(int fd, int ipcp_flow_write(int fd, struct shm_du_buff * sdb); +void ipcp_flow_fini(int fd); + void ipcp_flow_del(struct shm_du_buff * sdb); #endif /* OUROBOROS_IPCP_DEV_H */ diff --git a/include/ouroboros/shm_rbuff.h b/include/ouroboros/shm_rbuff.h index d9422ab9..898bdaa8 100644 --- a/include/ouroboros/shm_rbuff.h +++ b/include/ouroboros/shm_rbuff.h @@ -36,10 +36,12 @@ void shm_rbuff_close(struct shm_rbuff * rb); void shm_rbuff_destroy(struct shm_rbuff * rb); -int shm_rbuff_block(struct shm_rbuff * rb); +void shm_rbuff_block(struct shm_rbuff * rb); void shm_rbuff_unblock(struct shm_rbuff * rb); +void shm_rbuff_fini(struct shm_rbuff * rb); + int shm_rbuff_write(struct shm_rbuff * rb, size_t idx); -- cgit v1.2.3