mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c64a4d3e0
commit
d24d885aa4
14 changed files with 29 additions and 30 deletions
|
@ -261,7 +261,7 @@ void sleep(int ticks)
|
|||
#elif defined(CREATIVE_ZVx) && defined(BOOTLOADER)
|
||||
/* hacky.. */
|
||||
long sleep_ticks = current_tick + ticks + 1;
|
||||
while (sleep_ticks > current_tick)
|
||||
while (TIME_BEFORE(current_tick, sleep_ticks))
|
||||
switch_thread();
|
||||
#else
|
||||
disable_irq();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue