summaryrefslogtreecommitdiff
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-27 15:36:02 (GMT)
committerTom Rini <trini@konsulko.com>2017-01-14 21:46:30 (GMT)
commit21cdd133ca8b328fe790c85b1dc104fdc4992a71 (patch)
treeaf78391e095e5440dbd3231a00abcbe981ec2874 /common/dlmalloc.c
parentff90af6c73883121358251bba66245ff4da3755c (diff)
downloadu-boot-21cdd133ca8b328fe790c85b1dc104fdc4992a71.tar.xz
time: import time_after, time_before and friends from Linux
It is not safe to compare timer values directly. On 32-bit systems, for example, timer_get_us() wraps around every 72 min. (2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min). Depending on the get_ticks() implementation, it may wrap more frequently. The 72 min might be possible on the use of U-Boot. Let's borrow time_after, time_before, and friends to solve the wrap-around problem. These macros were copied from include/linux/jiffies.h of Linux 4.9. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/dlmalloc.c')
0 files changed, 0 insertions, 0 deletions