From fae2e83622f43b38df56c31641d97ba3a3bc67f9 Mon Sep 17 00:00:00 2001 From: mjpt777 Date: Fri, 3 May 2019 13:52:44 +0100 Subject: [PATCH] [C] Sweep for flow and congestion control suppliers for channel length type. --- aeron-driver/src/main/c/aeron_flow_control.c | 8 +++----- aeron-driver/src/main/c/aeron_flow_control.h | 7 ++----- aeron-driver/src/main/c/aeronmd.h | 2 +- aeron-driver/src/main/c/util/aeron_dlopen.c | 6 +++--- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/aeron-driver/src/main/c/aeron_flow_control.c b/aeron-driver/src/main/c/aeron_flow_control.c index 3a1710d6a9..5246386f2d 100644 --- a/aeron-driver/src/main/c/aeron_flow_control.c +++ b/aeron-driver/src/main/c/aeron_flow_control.c @@ -98,9 +98,7 @@ int64_t aeron_max_flow_control_strategy_on_sm( return snd_lmt > window_edge ? snd_lmt : window_edge; } -bool aeron_max_flow_control_strategy_should_linger( - void *state, - int64_t now_ns) +bool aeron_max_flow_control_strategy_should_linger(void *state, int64_t now_ns) { aeron_max_flow_control_strategy_state_t *strategy_state = (aeron_max_flow_control_strategy_state_t *)state; @@ -119,7 +117,7 @@ int aeron_max_flow_control_strategy_fini(aeron_flow_control_strategy_t *strategy int aeron_max_multicast_flow_control_strategy_supplier( aeron_flow_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int64_t registration_id, @@ -151,7 +149,7 @@ int aeron_max_multicast_flow_control_strategy_supplier( int aeron_unicast_flow_control_strategy_supplier( aeron_flow_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int64_t registration_id, diff --git a/aeron-driver/src/main/c/aeron_flow_control.h b/aeron-driver/src/main/c/aeron_flow_control.h index a03ead5f02..1402cd33f8 100644 --- a/aeron-driver/src/main/c/aeron_flow_control.h +++ b/aeron-driver/src/main/c/aeron_flow_control.h @@ -40,12 +40,9 @@ typedef int64_t (*aeron_flow_control_strategy_on_sm_func_t)( size_t position_bits_to_shift, int64_t now_ns); -typedef bool (*aeron_flow_control_strategy_should_linger_func_t)( - void *state, - int64_t now_ns); +typedef bool (*aeron_flow_control_strategy_should_linger_func_t)(void *state, int64_t now_ns); -typedef int (*aeron_flow_control_strategy_fini_func_t)( - aeron_flow_control_strategy_t *strategy); +typedef int (*aeron_flow_control_strategy_fini_func_t)(aeron_flow_control_strategy_t *strategy); typedef struct aeron_flow_control_strategy_stct { diff --git a/aeron-driver/src/main/c/aeronmd.h b/aeron-driver/src/main/c/aeronmd.h index 95949c24a6..c7511d7e9b 100644 --- a/aeron-driver/src/main/c/aeronmd.h +++ b/aeron-driver/src/main/c/aeronmd.h @@ -244,7 +244,7 @@ typedef struct aeron_flow_control_strategy_stct aeron_flow_control_strategy_t; typedef int (*aeron_flow_control_strategy_supplier_func_t)( aeron_flow_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int64_t registration_id, diff --git a/aeron-driver/src/main/c/util/aeron_dlopen.c b/aeron-driver/src/main/c/util/aeron_dlopen.c index 799c0b8251..802f7fc140 100644 --- a/aeron-driver/src/main/c/util/aeron_dlopen.c +++ b/aeron-driver/src/main/c/util/aeron_dlopen.c @@ -47,7 +47,7 @@ const char *aeron_dlinfo(const void *addr, char *buffer, size_t max_buffer_lengt #ifdef AERON_DRIVER int aeron_max_multicast_flow_control_strategy_supplier( aeron_flow_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int64_t registration_id, @@ -56,7 +56,7 @@ int aeron_max_multicast_flow_control_strategy_supplier( int aeron_unicast_flow_control_strategy_supplier( aeron_flow_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int64_t registration_id, @@ -65,7 +65,7 @@ int aeron_unicast_flow_control_strategy_supplier( int aeron_static_window_congestion_control_strategy_supplier( aeron_congestion_control_strategy_t **strategy, - int32_t channel_length, + size_t channel_length, const char *channel, int32_t stream_id, int32_t session_id,