Replaced add64, add64u and add64ul with operators.

Change-Id: Ia537f83e15cb686f1b81b34d73596f4298b0a924
This commit is contained in:
Gerard
2013-11-11 19:17:03 +01:00
committed by Ben Gras
parent 288e6864c8
commit f1b0deacf3
21 changed files with 33 additions and 53 deletions

View File

@@ -9,21 +9,6 @@
#include <limits.h>
static inline u64_t add64(u64_t i, u64_t j)
{
return i + j;
}
static inline u64_t add64u(u64_t i, unsigned j)
{
return i + j;
}
static inline u64_t add64ul(u64_t i, unsigned long j)
{
return i + j;
}
static inline int bsr64(u64_t i)
{
int index;

View File

@@ -89,12 +89,12 @@ clock_t tmrs_settimer(timer_t **tmrs, timer_t *tp, clock_t exp_time,
if(_cum_instances == 0) { \
RESET_STATS(_starttime, _cum_instances, _cum_spenttime, _cum_starttime); \
} \
_next_cum_spent = add64(_cum_spenttime, _dt); \
_next_cum_spent = _cum_spenttime + _dt; \
if(ex64hi(_next_cum_spent)) { \
PRINT_STATS(_cum_spenttime, _cum_instances); \
RESET_STATS(_starttime, _cum_instances, _cum_spenttime, _cum_starttime); \
} \
_cum_spenttime = add64(_cum_spenttime, _dt); \
_cum_spenttime += _dt; \
_cum_instances++; \
_cum_dt = sub64(_endtime, _cum_starttime); \
if(cmp64(_cum_dt, make64(0, 120)) > 0) { \