Exynos5420: invoke the cooperative threading in udelay
Call thread_yield_microseconds in udelay. This works with and without COOP_MULTITASKING enabled. BUG=None TEST=Build and boot with multitasking on and off, it works. BRANCH=None Change-Id: Ib3eab00d1630dc4daada850e7458ab89702d1864 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://gerrit.chromium.org/gerrit/66327 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Ronald G. Minnich <rminnich@chromium.org> Tested-by: Ronald G. Minnich <rminnich@chromium.org>
This commit is contained in:
parent
f011097e9f
commit
12e55ba8a6
1 changed files with 4 additions and 1 deletions
|
|
@ -20,7 +20,7 @@
|
|||
#include <console/console.h>
|
||||
#include <timer.h>
|
||||
#include <delay.h>
|
||||
|
||||
#include <thread.h>
|
||||
#include "clk.h"
|
||||
|
||||
void init_timer(void)
|
||||
|
|
@ -33,6 +33,9 @@ void udelay(unsigned usec)
|
|||
{
|
||||
struct mono_time current, end;
|
||||
|
||||
if (!thread_yield_microseconds(usec))
|
||||
return;
|
||||
|
||||
timer_monotonic_get(¤t);
|
||||
end = current;
|
||||
mono_time_add_usecs(&end, usec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue