Make udelay() wrap-safe.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12702 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Barry Wardell 2007-03-10 12:28:25 +00:00
parent ed40d3a65e
commit de061e8a30

View file

@ -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);