25 #ifndef __MOTR_ADDB2_COUNTER_H__ 26 #define __MOTR_ADDB2_COUNTER_H__ 64 int64_t
val, uint64_t datum);
72 struct m0_tl *
list, uint64_t label,
int idx);
79 #define M0_ADDB2_TIMED_0(id, datum, ...) \ 80 m0_time_t __start = m0_time_now(); \ 82 m0_time_t __duration; \ 83 uint64_t __datum = (datum); \ 84 uint64_t __id = (id); \ 86 __end = m0_time_now(); \ 87 __duration = (__end - __start) >> 10; \ 89 M0_ADDB2_ADD(__id, __duration, __datum); \ 91 #define M0_ADDB2_TIMED(id, counter, datum, ...) \ 93 struct m0_addb2_counter *__counter = (counter); \ 94 M0_ADDB2_TIMED_0((id), (datum), __VA_ARGS__); \ 95 if (__counter != NULL) \ 96 m0_addb2_counter_mod_with(__counter, __duration, __datum); \ 105 uint64_t
id, uint64_t
counter);
107 uint64_t
val, uint64_t datum);
static struct m0_list list
void m0_addb2_counter_add(struct m0_addb2_counter *counter, uint64_t label, int idx)
void m0_addb2_list_counter_del(struct m0_addb2_list_counter *counter)
void m0_addb2_counter_mod_with(struct m0_addb2_counter *counter, int64_t val, uint64_t datum)
void m0_addb2_clock_del(struct m0_addb2_sensor *clock)
void m0_addb2_counter_del(struct m0_addb2_counter *counter)
struct m0_addb2_counter_data co_val
int m0_addb2_local_counter_init(struct m0_addb2_local_counter *lc, uint64_t id, uint64_t counter)
void m0_addb2_clock_add(struct m0_addb2_sensor *clock, uint64_t label, int idx)
void m0_addb2_list_counter_add(struct m0_addb2_list_counter *counter, struct m0_tl *list, uint64_t label, int idx)
struct m0_addb2_sensor co_sensor
void m0_addb2_counter_mod(struct m0_addb2_counter *counter, int64_t val)
void m0_addb2_local_counter_mod(struct m0_addb2_local_counter *lc, uint64_t val, uint64_t datum)
struct m0_addb2_sensor lc_sensor