summaryrefslogtreecommitdiff
path: root/src/lib/shm_ap_rbuff.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-18 14:22:06 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-19 13:24:39 +0200
commit2c8e29ca7a997c5aa9d34e3fa956b120a0bbf20c (patch)
tree6807a23a6def167a2b9ab26937fe25bbcc2a8064 /src/lib/shm_ap_rbuff.c
parent0192488015770b4855165db8502214dad1941dd2 (diff)
downloadouroboros-2c8e29ca7a997c5aa9d34e3fa956b120a0bbf20c.tar.gz
ouroboros-2c8e29ca7a997c5aa9d34e3fa956b120a0bbf20c.zip
ipcpd: normal: Handle enrollment replies
This adds a condition variable with a timeout to the CDAP request so that we can respond correctly to the answer from the remote. It also adds a timeout to the condition variable waiting on completion of enrollment. Furthermore, for every CDAP callback a new thread is now spawned, to avoid deadlocking in case a callback is stuck.
Diffstat (limited to 'src/lib/shm_ap_rbuff.c')
-rw-r--r--src/lib/shm_ap_rbuff.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/shm_ap_rbuff.c b/src/lib/shm_ap_rbuff.c
index 1c7fd600..4ca29636 100644
--- a/src/lib/shm_ap_rbuff.c
+++ b/src/lib/shm_ap_rbuff.c
@@ -40,8 +40,6 @@
#include <signal.h>
#include <sys/stat.h>
-#define PTHREAD_COND_CLOCK CLOCK_MONOTONIC
-
#define SHM_RBUFF_FILE_SIZE (SHM_BUFFER_SIZE * sizeof(struct rb_entry) \
+ 2 * sizeof(size_t) + sizeof(pthread_mutex_t) \
+ 2 * sizeof (pthread_cond_t))