summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-10-26 19:30:52 +0200
committerdimitri staessens <[email protected]>2016-10-26 20:09:21 +0200
commit963537079c7d5a9f9fb39355fb0e3b84a78eaa0b (patch)
tree7f9a78e0d57f95d903bcbbf01a00e71482593277 /include
parent7848ec4100f8677392fb6b07c42dd47ee6aa9b0d (diff)
downloadouroboros-963537079c7d5a9f9fb39355fb0e3b84a78eaa0b.tar.gz
ouroboros-963537079c7d5a9f9fb39355fb0e3b84a78eaa0b.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/ipcp-dev.h2
-rw-r--r--include/ouroboros/shm_rbuff.h4
2 files changed, 5 insertions, 1 deletions
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);