Convert sb_counter_add() to C99 inline.
This commit is contained in:
@ -28,8 +28,10 @@
|
||||
static sb_counters_t last_intermediate_counters;
|
||||
static sb_counters_t last_cumulative_counters;
|
||||
|
||||
extern inline uint64_t sb_counter_val(int thread_id, sb_counter_type_t type);
|
||||
extern inline void sb_counter_inc(int thread_id, sb_counter_type_t type);
|
||||
extern inline uint64_t sb_counter_val(int, sb_counter_type_t);
|
||||
extern inline void sb_counter_add(int, sb_counter_type_t, uint64_t);
|
||||
extern inline void sb_counter_inc(int, sb_counter_type_t);
|
||||
|
||||
|
||||
/* Initialize per-thread stats */
|
||||
|
||||
|
||||
@ -65,8 +65,7 @@ inline uint64_t sb_counter_val(int thread_id, sb_counter_type_t type)
|
||||
}
|
||||
|
||||
/* Add a given value to a given stat counter for a given thread */
|
||||
static inline void sb_counter_add(int thread_id, sb_counter_type_t type,
|
||||
uint64_t val)
|
||||
inline void sb_counter_add(int thread_id, sb_counter_type_t type, uint64_t val)
|
||||
{
|
||||
ck_pr_store_64(&sb_counters[thread_id][type],
|
||||
sb_counter_val(thread_id, type) + val);
|
||||
|
||||
Reference in New Issue
Block a user