Make udelay() wrap-safe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12702 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ed40d3a65e
commit
de061e8a30
1 changed files with 2 additions and 2 deletions
|
@ -39,8 +39,8 @@ extern unsigned int ipod_hw_rev;
|
|||
|
||||
static inline void udelay(unsigned usecs)
|
||||
{
|
||||
unsigned start = USEC_TIMER;
|
||||
while ((USEC_TIMER - start) < usecs);
|
||||
unsigned stop = USEC_TIMER + usecs;
|
||||
while (TIME_AFTER(USEC_TIMER, stop));
|
||||
}
|
||||
|
||||
unsigned int current_core(void);
|
||||
|
|
Loading…
Reference in a new issue