| 7 | __weak void init_timer(void) { /* do nothing */ } |
| 8 | |
| 9 | void udelay(unsigned int usec) |
| 10 | { |
| 11 | struct stopwatch sw; |
| 12 | |
| 13 | /* |
| 14 | * As the timer granularity is in microseconds pad the |
| 15 | * requested delay by one to get at least >= requested usec delay. |
| 16 | */ |
| 17 | usec += 1; |
| 18 | |
| 19 | if (!thread_yield_microseconds(usec)) |
| 20 | return; |
| 21 | |
| 22 | stopwatch_init_usecs_expire(&sw, usec); |
| 23 | stopwatch_wait_until_expired(&sw); |
| 24 | } |
no test coverage detected