src/sflow.c
static int32_t add_random_skip(SFWB *sm)
{
    sflow_atomic_int_t next_skip = sfl_sampler_next_skip(sm->sampler);
#if (SFLOW_THREADS)
    sflow_atomic_int_t test_skip = sflow_atomic_fetch_add(&sm->sflow_skip, next_skip);
    return (test_skip + next_skip);
#else
    sm->sflow_skip = next_skip;
    return next_skip;
#endif
}
/*_________________----------------------------------_______________
  _________________       add_random_skip            _______________
  -----------------__________________________________---------------
  return false if adding the next skip count did not bring the skip
  count back above 0 (only an issue in multithreaded deployment)
*/
return false if adding the next skip count did not bring the skip
count back above 0 (only an issue in multithreaded deployment)
return false if adding the next skip count did not bring the skip count back above 0 ( only an issue in multithreaded deployment )
static int32_t add_random_skip(SFWB *sm)
{
    sflow_atomic_int_t next_skip = sfl_sampler_next_skip(sm->sampler);
#if (SFLOW_THREADS)
    sflow_atomic_int_t test_skip = sflow_atomic_fetch_add(&sm->sflow_skip, next_skip);
    return (test_skip + next_skip);
#else
    sm->sflow_skip = next_skip;
    return next_skip;
#endif
}
static int32_t add_random_skip ( SFWB * sm ) { sflow_atomic_int_t next_skip = sfl_sampler_next_skip ( sm -> sampler ) ; #if ( SFLOW_THREADS ) sflow_atomic_int_t test_skip = sflow_atomic_fetch_add ( & sm -> sflow_skip , next_skip ) ; return ( test_skip + next_skip ) ; #else sm -> sflow_skip = next_skip ; return next_skip ; #endif }
_________________----------------------------------_______________
_________________       add_random_skip            _______________
__________________________________
return false if adding the next skip count did not bring the skip
count back above 0 (only an issue in multithreaded deployment)
_________________ ---------------------------------- _______________ _________________ add_random_skip _______________ __________________________________ return false if adding the next skip count did not bring the skip count back above 0 ( only an issue in multithreaded deployment )