Skip to content

Commit

Permalink
[C] Sweep for flow and congestion control suppliers for channel lengt…
Browse files Browse the repository at this point in the history
…h type.
  • Loading branch information
mjpt777 committed May 3, 2019
1 parent 6c38c45 commit fae2e83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
8 changes: 3 additions & 5 deletions aeron-driver/src/main/c/aeron_flow_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions aeron-driver/src/main/c/aeron_flow_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion aeron-driver/src/main/c/aeronmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions aeron-driver/src/main/c/util/aeron_dlopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit fae2e83

Please sign in to comment.