From 79475a4742bc28e1737044f2300bcb601e6e10bf Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 30 Jun 2016 23:14:14 +0200 Subject: lib: robust locking in shared memory and crash recovery This PR enhances the shared memory providing recovery if a process crashes. It adds a SHM_DU_TIMEOUT_MICROS variable, setting an expiration time for SDU's when shared memory is full. If an application doesn't read a blocking SDU within this time, the shared memory will be cleansed of all SDU's for this application and the application's rbuff will be cleared. Some refactoring of the API's. Fixed wrong pthread checks in IRMd. Fixes #13 Fixes #14 --- src/ipcpd/flow.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipcpd/flow.h') diff --git a/src/ipcpd/flow.h b/src/ipcpd/flow.h index e27882e2..b0f1390a 100644 --- a/src/ipcpd/flow.h +++ b/src/ipcpd/flow.h @@ -32,6 +32,8 @@ struct flow { int port_id; struct shm_ap_rbuff * rb; enum flow_state state; + + pid_t api; }; #endif /* OUROBOROS_FLOW_H */ -- cgit v1.2.3