From 4931526cf9b5e40294e043deab856f25bf56c7cf Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 3 Aug 2016 13:40:16 +0200 Subject: lib: Revise blocking I/O Blocking I/O now uses condition variables in the shared memory instead of busy waiting. Timeouts can be specified. This requires the size of the rbuffs and du_map to be the same, to guarantee that when the shm_du_map is not full, the ap_rbuffs can't be full either. Added the timeout option to the flow for future use. --- include/ouroboros/config.h.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/ouroboros/config.h.in') diff --git a/include/ouroboros/config.h.in b/include/ouroboros/config.h.in index 8898699c..46685569 100644 --- a/include/ouroboros/config.h.in +++ b/include/ouroboros/config.h.in @@ -40,12 +40,11 @@ #define SHM_DU_MAP_MULTI_BLOCK #define SHM_DU_MAP_FILENAME "/ouroboros.shm" #define LOCKFILE_NAME "/ouroboros.lockfile" -#define SHM_BLOCKS_IN_MAP (1 << 14) +#define SHM_BUFFER_SIZE (1 << 14) #define SHM_DU_TIMEOUT_MICROS 15000 #define DU_BUFF_HEADSPACE 128 #define DU_BUFF_TAILSPACE 0 #define SHM_AP_RBUFF_PREFIX "/ouroboros.rbuff." -#define SHM_RBUFF_SIZE (1 << 14) #define IRMD_MAX_FLOWS 4096 #define IRMD_THREADPOOL_SIZE 5 #define IRMD_FLOW_TIMEOUT 5000 /* ms */ -- cgit v1.2.3